ensure testPattern() always has a return condition

The function is already guarded by a conditional in the shader, so we don't need to worry about pc_testpattern being <1.

This was tripping up D3D compilers via librashader.
This commit is contained in:
hizzlekizzle 2024-09-17 18:11:50 -05:00 committed by GitHub
parent 5ab3c76109
commit 33876b3578
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1059,9 +1059,7 @@ vec3 nesFullPalette(vec2 pos) {
}
vec3 testPattern(vec2 pos) {
if(global.pc_testpattern < 1.5) {
return smpteBars(pos);
} else if(global.pc_testpattern < 2.5) {
if(global.pc_testpattern < 2.5) {
return colorRamps(pos);
} else if(global.pc_testpattern < 3.5) {
return hsvSpectrum(pos, false);
@ -1070,6 +1068,7 @@ vec3 testPattern(vec2 pos) {
} else if(global.pc_testpattern < 5.5) {
return nesFullPalette(pos);
}
else return smpteBars(pos);
}
// These two sRGB functions are taken from shaders_slang/include/colorspace-tools.h