mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:36:54 +02:00
shader not compiling properly have been fixed
This commit is contained in:
parent
e560687371
commit
2b631efb5d
2 changed files with 15 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
||||||
<@include gpu/Config.slh@>
|
<@include gpu/Config.slh@>
|
||||||
<$VERSION_HEADER$>
|
<$VERSION_HEADER$>
|
||||||
// Generated on <$_SCRIBE_DATE$>
|
// Generated on <$_SCRIBE_DATE$>
|
||||||
//
|
//
|
||||||
// model.vert
|
// model.vert
|
||||||
|
@ -12,9 +12,9 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
<@include gpu/Transform.slh@>
|
<@include gpu/Transform.slh@>
|
||||||
|
|
||||||
<$declareStandardTransform()$>
|
<$declareStandardTransform()$>
|
||||||
|
|
||||||
const int MAX_TEXCOORDS = 2;
|
const int MAX_TEXCOORDS = 2;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ varying vec4 interpolatedNormal;
|
||||||
// the interpolated tangent
|
// the interpolated tangent
|
||||||
varying vec4 interpolatedTangent;
|
varying vec4 interpolatedTangent;
|
||||||
|
|
||||||
varying vec3 color;
|
varying vec3 color;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
// transform and store the normal and tangent for interpolation
|
// transform and store the normal and tangent for interpolation
|
||||||
|
@ -42,13 +42,13 @@ void main(void) {
|
||||||
// and the texture coordinates
|
// and the texture coordinates
|
||||||
gl_TexCoord[0] = texcoordMatrices[0] * vec4(gl_MultiTexCoord0.xy, 0.0, 1.0);
|
gl_TexCoord[0] = texcoordMatrices[0] * vec4(gl_MultiTexCoord0.xy, 0.0, 1.0);
|
||||||
|
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToClipPos(cam, obj, gl_Vertex, gl_Position)$>
|
<$transformModelToClipPos(cam, obj, gl_Vertex, gl_Position)$>
|
||||||
<$transformModelToEyeDir(cam, obj, gl_Normal, interpolatedNormal.xyz)$>
|
<$transformModelToEyeDir(cam, obj, gl_Normal, interpolatedNormal.xyz)$>
|
||||||
<$transformModelToEyeDir(cam, obj, tangent, interpolatedTangent.xyz)$>
|
<$transformModelToEyeDir(cam, obj, tangent, interpolatedTangent.xyz)$>
|
||||||
|
|
||||||
interpolatedNormal = vec4(normalize(interpolatedNormal.xyz), 0.0);
|
interpolatedNormal = vec4(normalize(interpolatedNormal.xyz), 0.0);
|
||||||
interpolatedTangent = vec4(normalize(interpolatedTangent.xyz), 0.0);
|
interpolatedTangent = vec4(normalize(interpolatedTangent.xyz), 0.0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ varying vec3 color;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
normal = vec4(0.0, 0.0, 0.0, 0.0);
|
interpolatedNormal = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
for (int i = 0; i < INDICES_PER_VERTEX; i++) {
|
for (int i = 0; i < INDICES_PER_VERTEX; i++) {
|
||||||
mat4 clusterMatrix = clusterMatrices[int(clusterIndices[i])];
|
mat4 clusterMatrix = clusterMatrices[int(clusterIndices[i])];
|
||||||
float clusterWeight = clusterWeights[i];
|
float clusterWeight = clusterWeights[i];
|
||||||
|
|
Loading…
Reference in a new issue