DXGL r185 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r184‎ | r185 | r186 >
Date:22:09, 27 June 2012
Author:admin
Status:new
Tags:
Comment:
Quick hack to make pre-transformed vertices do something.
Modified paths:
  • /ddraw/shadergen.cpp (modified) (history)

Diff [purge]

Index: ddraw/shadergen.cpp
@@ -278,7 +278,7 @@
279279 gl_Position = vec4(pos.x,-pos.y,pos.z,pos.w);\n";
280280 static const char op_normalize[] = "N = normalize(normalmat*nxyz);\n";
281281 static const char op_normalpassthru[] = "N = normalmat*nxyz;\n";
282 -static const char op_passthru[] = "gl_Position = xyzw;\n";
 282+static const char op_passthru[] = "gl_Position = vec4(xyz/640.0,1.0/rhw);\n";
283283 static const char op_resetcolor[] = "diffuse = specular = vec4(0.0);\n\
284284 ambient = ambientcolor / 255.0;\n";
285285 static const char op_dirlight[] = "DirLight(lightX);\n";