WIP: Cleanup: GPv3: Remove some debug code #117344
|
@ -54,23 +54,12 @@ vec3 gpencil_lighting(void)
|
||||||
return clamp(light_accum, 0.0, 1e10);
|
return clamp(light_accum, 0.0, 1e10);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Remove this once we can render textures. */
|
|
||||||
vec4 debug_texture(vec2 uv)
|
|
||||||
{
|
|
||||||
vec4 col = vec4(mod(uv.xy, 1.0), 0.0, 1.0);
|
|
||||||
return col * min(length(uv.xy * 2.0 - 1.0), 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 col;
|
vec4 col;
|
||||||
if (flag_test(gp_interp_flat.mat_flag, GP_STROKE_TEXTURE_USE)) {
|
if (flag_test(gp_interp_flat.mat_flag, GP_STROKE_TEXTURE_USE)) {
|
||||||
bool premul = flag_test(gp_interp_flat.mat_flag, GP_STROKE_TEXTURE_PREMUL);
|
bool premul = flag_test(gp_interp_flat.mat_flag, GP_STROKE_TEXTURE_PREMUL);
|
||||||
col = texture_read_as_linearrgb(gpStrokeTexture, premul, gp_interp.uv);
|
col = texture_read_as_linearrgb(gpStrokeTexture, premul, gp_interp.uv);
|
||||||
|
|
||||||
/* TODO: Remove this once we can render textures. */
|
|
||||||
/* Debug color. (Because textures are not yet implemented) */
|
|
||||||
col = debug_texture(gp_interp.uv);
|
|
||||||
}
|
}
|
||||||
else if (flag_test(gp_interp_flat.mat_flag, GP_FILL_TEXTURE_USE)) {
|
else if (flag_test(gp_interp_flat.mat_flag, GP_FILL_TEXTURE_USE)) {
|
||||||
bool use_clip = flag_test(gp_interp_flat.mat_flag, GP_FILL_TEXTURE_CLIP);
|
bool use_clip = flag_test(gp_interp_flat.mat_flag, GP_FILL_TEXTURE_CLIP);
|
||||||
|
|
Loading…
Reference in New Issue