Already time for another status report:

What did you do in the previous week?

UV data can now be passed to shaders. If the name of a UV layer is found in the vertex shader as an attribute, the UV layer’s texture coordinates will be passed to the shader. For example if I have the following in a vertex shader:

attribute vec2 UVTex;

I will get the UV coordinates for the layer named UVTex (the default name for UV layers). The data can then be passed to the fragment shader via a varying variable:

#version 120

attribute vec2 UVTex;

// Output
varying out vec2 texcoords;

void main(void)
{
	gl_Position = ftransform();
	texcoords = UVTex;
}

And then used:

#version 120

varying vec2 texcoords;
uniform sampler2D texture;

void main(void)
{
	gl_FragColor = texture2D(texture, texcoords);
}

(The above shaders are from memory and might not be 100% correct)

I also fixed a bug in the sampler code so that image data is actually being sent correctly.

What do you plan to do in the following week?

I plan to start working on cleaning/stabilizing/fixing/etc. Next week I will work getting the custom shaders working when the BGE is in Mutlitexture Material mode.

Describe any issues you are having that may require extra attention.

Currently there are no issues that may require extra attention.

Let us know whether you feel that you are on schedule, ahead of schedule, or behind schedule. If you are behind schedule, please let us know what we can do together to get things back on track.

I feel like I’m on schedule.

Advertisements