mTD3DImageOutputs[] works but outputs an error

In the 2022 builds this would just work.
In the 2023 builds I get this error: ERROR: /project1/write3DPixel:26: ‘mTD3DImageOutputs’ : undeclared identifier

but it outputs to 3DTex none the less.

Here is the code I learned from this wnoderful tutorial:

uniform vec4 uDiffuseColor;
uniform vec4 uAmbientColor;
uniform vec3 uSpecularColor;
uniform float uShininess;
uniform float uShadowStrength;
uniform vec3 uShadowColor;

uniform vec3 uTexRes;

in Vertex
{
	vec4 color;
	vec3 worldSpacePos;
	vec3 worldSpaceNorm;
	flat int cameraIndex;
} iVert;

// Output variable for the color
layout(location = 0) out vec4 oFragColor[TD_NUM_COLOR_BUFFERS];
void main()
{
	
	
	ivec3 coords = ivec3((iVert.worldSpacePos+0.5)*uTexRes);
	
	imageStore(mTD3DImageOutputs[0], coords, vec4(1.));
	


	vec4 outcol = vec4(1);
	oFragColor[0] = TDOutputSwizzle(outcol);


	// TD_NUM_COLOR_BUFFERS will be set to the number of color buffers
	// active in the render. By default we want to output zero to every
	// buffer except the first one.
	for (int i = 1; i < TD_NUM_COLOR_BUFFERS; i++)
	{
		oFragColor[i] = vec4(0.0);
	}
}

This is a known issue. The GLSL MAT no longer knows about the image outputs, so it’s test compilation fails. The Render TOP does though, so the code it generates works. I’m trying to figure out a way to make it compile cleanly without making the GLSL code super messy

3 Likes