diff options
Diffstat (limited to 'servers/rendering/renderer_rd/shaders/particles_copy.glsl')
-rw-r--r-- | servers/rendering/renderer_rd/shaders/particles_copy.glsl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/servers/rendering/renderer_rd/shaders/particles_copy.glsl b/servers/rendering/renderer_rd/shaders/particles_copy.glsl index afbd5a9caa..67a894b86f 100644 --- a/servers/rendering/renderer_rd/shaders/particles_copy.glsl +++ b/servers/rendering/renderer_rd/shaders/particles_copy.glsl @@ -206,11 +206,12 @@ void main() { // as they will be drawn with the node position as origin. txform = params.inv_emission_transform * txform; } - - txform = transpose(txform); } else { - txform = mat4(vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0)); //zero scale, becomes invisible + // Set scale to zero and translate to -INF so particle will be invisible + // even for materials that ignore rotation/scale (i.e. billboards). + txform = mat4(vec4(0.0), vec4(0.0), vec4(0.0), vec4(-1.0 / 0.0, -1.0 / 0.0, -1.0 / 0.0, 0.0)); } + txform = transpose(txform); if (params.copy_mode_2d) { uint write_offset = gl_GlobalInvocationID.x * (2 + 1 + 1); //xform + color + custom |