adding position in shader

This commit is contained in:
Clément Le Bihan
2021-06-17 18:22:59 +02:00
parent d0f3214aef
commit bc8504a026
4 changed files with 23 additions and 2 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ varying vec3 fragNormal;
void main() {
// Send vertex attributes to fragment shader
fragPosition = vertexPosition + vertexPosition * vec3(cnoise(vec3(vertexNormal + vec3(frame))) * 0.5);
fragPosition = vertexPosition + vertexPosition * vec3(cnoise(vec3(vertexNormal + center + vec3(frame))) * 0.5);
fragColor = vertexColor;
fragNormal = vertexNormal;
fragTexCoord = vertexTexCoord;