Skip to content

Commit

Permalink
remove some extraneous cruft in stock and slang conversion template
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterk committed Jun 25, 2019
1 parent ec1f33c commit 8914a53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
6 changes: 2 additions & 4 deletions slang-conversion-template.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
#endif

COMPAT_ATTRIBUTE vec4 VertexCoord;
COMPAT_ATTRIBUTE vec4 COLOR;
COMPAT_ATTRIBUTE vec4 TexCoord;
COMPAT_VARYING vec4 COL0;
COMPAT_VARYING vec4 TEX0;
// out variables go here as COMPAT_VARYING whatever

Expand All @@ -51,8 +49,8 @@ uniform COMPAT_PRECISION float WHATEVER;

void main()
{
gl_Position = MVPMatrix * VertexCoord;
TEX0.xy = TexCoord.xy;
gl_Position = MVPMatrix * VertexCoord;
TEX0.xy = TexCoord.xy;
// Paste vertex contents here:
}

Expand Down
17 changes: 1 addition & 16 deletions stock.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ COMPAT_ATTRIBUTE vec4 TexCoord;
COMPAT_VARYING vec4 COL0;
COMPAT_VARYING vec4 TEX0;

vec4 _oPosition1;
uniform mat4 MVPMatrix;
uniform COMPAT_PRECISION int FrameDirection;
uniform COMPAT_PRECISION int FrameCount;
Expand All @@ -32,13 +31,7 @@ uniform COMPAT_PRECISION vec2 InputSize;

void main()
{
vec4 _oColor;
vec2 _otexCoord;
gl_Position = VertexCoord.x * MVPMatrix[0] + VertexCoord.y * MVPMatrix[1] + VertexCoord.z * MVPMatrix[2] + VertexCoord.w * MVPMatrix[3];
_oPosition1 = gl_Position;
_oColor = COLOR;
_otexCoord = TexCoord.xy;
COL0 = COLOR;
TEX0.xy = TexCoord.xy;
}

Expand All @@ -65,24 +58,16 @@ precision mediump float;
#define COMPAT_PRECISION
#endif

struct output_dummy {
vec4 _color;
};

uniform COMPAT_PRECISION int FrameDirection;
uniform COMPAT_PRECISION int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
uniform sampler2D Texture;
COMPAT_VARYING vec4 TEX0;
//standard texture sample looks like this: COMPAT_TEXTURE(Texture, TEX0.xy);

void main()
{
output_dummy _OUT;
_OUT._color = COMPAT_TEXTURE(Texture, TEX0.xy);
FragColor = _OUT._color;
return;
FragColor = COMPAT_TEXTURE(Texture, TEX0.xy);
}
#endif

0 comments on commit 8914a53

Please sign in to comment.