Migrate old legacy code to the draw mamager/object mode. The old legacy version did not work with wireframe. By migrating the code to modern draw manager code we have mode control on the drawing process. Still background images do not work with OIT, the cause seems to be that the transparent pixels are treated as background pixels. Also There are some artifacts when working with Holdouts and DoF, this is because the draw engines do not pass the correct alpha values. Reviewers: fclem, brecht Differential Revision: https://developer.blender.org/D4638
19 lines
357 B
GLSL
19 lines
357 B
GLSL
uniform mat4 TransformMat;
|
|
uniform float flipX;
|
|
uniform float flipY;
|
|
uniform float depth;
|
|
|
|
in vec2 texCoord;
|
|
in vec2 pos;
|
|
|
|
out vec2 texCoord_interp;
|
|
|
|
void main()
|
|
{
|
|
vec4 position = TransformMat * vec4((pos - 0.5) * 2.0, 1.0, 1.0);
|
|
gl_Position = vec4(position.xy, depth, 1.0);
|
|
|
|
vec2 uv_mul = vec2(flipX, flipY);
|
|
texCoord_interp = texCoord * uv_mul;
|
|
}
|