zed
October 24, 2004, 3:44pm
1
im trying to cleanup my shaders so i dont get any warnings but there are two lines that i cant get right so they compile without warnings, any ideas?
(A)
vec3 normal, mv_vert, mv_cp;
normal = faceforward( normal, normal, ( mv_vert - mv_cp ) );
<stdlib>(7571) : warning C7011: implicit cast from “int” to “float”
(B)
vec4 camera_pos = gl_ModelViewMatrixInverse[3];
Humus
October 25, 2004, 8:01pm
2
A) Compiles fine for me. B) Doesn’t compile, apparently because gl_ModelViewMatrixInverse hasn’t been implemented yet.
zed
October 25, 2004, 9:44pm
3
they both compile and run fine and my card, its just that cause ive got the strict compiler warning option enabled, they both generate warnings, ive reread the spec a few times and tried various things but cant get them to go away
system
October 26, 2004, 5:49am
4
The warning don’t make sense to me in part A.
Part B, I haven’t used that matrix but nvidia defines them. ATI doesn’t.
Also,
normal = faceforward( normal, normal, ( mv_vert - mv_cp ) );
can become
normal = mv_cp-mv_vert;
if I’m not mistaken.
You should email them directly if it bothers you that much
system
Closed
October 19, 2021, 7:49pm
5
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.