You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading emission mask, particles use (diferent !) randomness for each of the components (position, color, normal).
I would expect that each pixel at a posiiton have the corect coor value and not a random one. Same for normals, that each pixel keep the normal he own, and not just a random value.
What's missing is to writte on the shader a variable 'custom_seed', that's passed to all of theses 3 parameters when loading from an emission mask.
And also, let 'generate emission mask' be a function that's available via script so we can generate from any textures !
What it should do COLORS:
What it does COLORS :
What it should do NORMAL:
demo_should.mp4
What it does NORMAL:
demo_should_NOT.mp4
I made a litle tool where I do as in the godot engine, but in GDScript to generate it from a viewport texture, and I altered the shader code to have a common 'custom_seed' shared between theses params.
Here is a part of the shader :
vec3 calculate_initial_position(inout uint alt_seed, in float custom_seed) {
...
int point = min(emission_texture_point_count - 1, int(custom_seed * float(emission_texture_point_count)));
ivec2 emission_tex_size = textureSize(emission_texture_points, 0);
ivec2 emission_tex_ofs = ivec2(point % emission_tex_size.x, point / emission_tex_size.x);
pos = texelFetch(emission_texture_points, emission_tex_ofs, 0).xyz;
}
...
}
Tested versions
4.3
System information
Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 32.0.15.6109) - 12th Gen Intel(R) Core(TM) i7-12700KF (20 Threads)
Issue description
When loading emission mask, particles use (diferent !) randomness for each of the components (position, color, normal).
I would expect that each pixel at a posiiton have the corect coor value and not a random one. Same for normals, that each pixel keep the normal he own, and not just a random value.
What's missing is to writte on the shader a variable 'custom_seed', that's passed to all of theses 3 parameters when loading from an emission mask.
And also, let 'generate emission mask' be a function that's available via script so we can generate from any textures !
demo_should.mp4
demo_should_NOT.mp4
I made a litle tool where I do as in the godot engine, but in GDScript to generate it from a viewport texture, and I altered the shader code to have a common 'custom_seed' shared between theses params.
Here is a part of the shader :
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: