remove usage of DRAWBUFFERS in favor of RENDERTARGETS. ensure i stop writing undefined data to some buffers.

This commit is contained in:
Xonk
2025-11-23 00:29:43 -05:00
parent 36739e3d67
commit 1bdfa87fbd
12 changed files with 15 additions and 12 deletions
+3 -1
View File
@@ -224,7 +224,9 @@ void main() {
gl_FragData[1].a = 0.0;
#if EMISSIVE_TYPE == 0
gl_FragData[2] = vec4(0.0,0.0,0.0,0.0);
#if EMISSIVE_TYPE == 0
gl_FragData[2].a = 0.0;
#else
gl_FragData[2].a = EMISSIVE;
+1
View File
@@ -589,6 +589,7 @@ void main() {
// SpecularTex.r = max(SpecularTex.r, rainfall);
// SpecularTex.g = max(SpecularTex.g, max(Puddle_shape*0.02,0.02));
gl_FragData[1] = vec4(0.0,0.0,0.0,0.0);
gl_FragData[1].rg = SpecularTex.rg;
#if EMISSIVE_TYPE == 0
+1 -1
View File
@@ -16,7 +16,7 @@ vec3 toLinear(vec3 sRGB){
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
/* DRAWBUFFERS:2 */
/* RENDERTARGETS:2 */
void main() {
+1 -1
View File
@@ -208,7 +208,7 @@ vec3 blackbody(float Temp)
}
void main() {
/* DRAWBUFFERS:7 */
/* RENDERTARGETS:7 */
float vignette = (1.5-dot(texcoord-0.5,texcoord-0.5)*2.);
float bloomyFog_Mult = BLOOMY_FOG;
+2 -2
View File
@@ -163,7 +163,7 @@ vec3 chromaticAberration(vec2 UV){
void main() {
/* DRAWBUFFERS:7 */
/* RENDERTARGETS:7 */
#ifdef CHROMATIC_ABERRATION
vec3 color = chromaticAberration(texcoord);
@@ -185,5 +185,5 @@ void main() {
color = colorGrading(color);
#endif
gl_FragData[0].rgb = clamp(int8Dither(color, texcoord),0.0,1.0);
gl_FragData[0] = vec4(clamp(int8Dither(color, texcoord),0.0,1.0), 0.0);
}
+1 -1
View File
@@ -17,7 +17,7 @@ uniform float viewWidth;
//////////////////////////////VOID MAIN//////////////////////////////
void main() {
/* DRAWBUFFERS:06 */
/* RENDERTARGETS:0,6 */
vec2 screenEdges = 2.0/vec2(viewWidth, viewHeight);
vec2 jitter = offsets[framemod8]*texelSize*0.5;
ivec2 center = ivec2(clamp(gl_FragCoord.xy*texelSize, screenEdges, 1.0-screenEdges)/texelSize);
+1 -1
View File
@@ -415,7 +415,7 @@ vec4 computeTAA(vec2 texcoord, bool hand){
void main() {
/* DRAWBUFFERS:5 */
/* RENDERTARGETS:5 */
#if TAA_MODE > 0
vec2 taauTC = clamp(texcoord*RENDER_SCALE, vec2(0.0), RENDER_SCALE - texelSize*2.0);
+1 -1
View File
@@ -22,7 +22,7 @@ vec2 decodeVec2(float a){
void main() {
/* DRAWBUFFERS:3 */
/* RENDERTARGETS:3 */
vec2 resScale = max(vec2(viewWidth,viewHeight),vec2(1920.0,1080.))/vec2(1920.,1080.);
vec2 quarterResTC = gl_FragCoord.xy*2.0*resScale*texelSize;
+1 -1
View File
@@ -10,7 +10,7 @@ uniform float viewHeight;
void main() {
/* DRAWBUFFERS:6 */
/* RENDERTARGETS:6 */
vec2 resScale = max(vec2(viewWidth,viewHeight),vec2(1920.0,1080.))/vec2(1920.,1080.);
vec2 quarterResTC = gl_FragCoord.xy*2.*texelSize;
+1 -1
View File
@@ -24,7 +24,7 @@ vec3 gauss1D(vec2 coord,vec2 dir,float alpha,int maxIT){
//////////////////////////////VOID MAIN//////////////////////////////
void main() {
/* DRAWBUFFERS:6 */
/* RENDERTARGETS:6 */
vec2 texcoord = (gl_FragCoord.xy*vec2(2.0,4.0))*texelSize;
vec2 gaussDir = vec2(1.0,0.0);
+1 -1
View File
@@ -23,7 +23,7 @@ vec3 gauss1D(vec2 coord,vec2 dir,float alpha,int maxIT){
//////////////////////////////VOID MAIN//////////////////////////////
void main() {
/* DRAWBUFFERS:6 */
/* RENDERTARGETS:6 */
vec2 texcoord = (gl_FragCoord.xy*vec2(2.0,4.0))*texelSize;
vec2 gaussDir = vec2(0.0,1.0);
+1 -1
View File
@@ -207,7 +207,7 @@ vec2 R2_samples(float n){
void main() {
/* DRAWBUFFERS:4 */
/* RENDERTARGETS:4 */
gl_FragData[0] = vec4(0.0);