mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
The variable layer editing shader was made OpenGL 2.0 compatible.
Fixed a bug in the scaling of colors for the variable layer editing.
This commit is contained in:
parent
006173342c
commit
8aae5bdb28
2 changed files with 3 additions and 3 deletions
|
@ -1700,8 +1700,8 @@ void main()
|
|||
float lod = clamp(0.5 * log2(max(dx_vtc*dx_vtc, dy_vtc*dy_vtc)), 0., 1.);
|
||||
// Sample the Z texture. Texture coordinates are normalized to <0, 1>.
|
||||
vec4 color =
|
||||
(1. - lod) * texture2DLod(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row + 0.5 )), 0.) +
|
||||
lod * texture2DLod(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row * 2. + 1.)), 1.);
|
||||
(1. - lod) * texture2D(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row + 0.5 )), -10000.) +
|
||||
lod * texture2D(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row * 2. + 1.)), 10000.);
|
||||
// Mix the final color.
|
||||
gl_FragColor =
|
||||
vec4(intensity_specular, intensity_specular, intensity_specular, 1.) +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue