mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-05 10:59:48 +00:00
shader modifs
This commit is contained in:
@@ -4,6 +4,7 @@ precision mediump float;
|
||||
|
||||
// Input vertex attributes (from vertex shader)
|
||||
varying vec3 fragPosition;
|
||||
varying vec3 fragNormal;
|
||||
varying vec2 fragTexCoord;
|
||||
|
||||
uniform sampler2D texture0;
|
||||
@@ -13,7 +14,9 @@ void main() {
|
||||
// Texel color fetching from texture sampler
|
||||
|
||||
// NOTE: Implement here your fragment shader code
|
||||
vec4 tmp = texture2D(texture0, fragTexCoord);
|
||||
vec4 tmp;
|
||||
tmp.rgb = texture2D(texture0, fragTexCoord).rgb;
|
||||
|
||||
|
||||
tmp.a = alpha;
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ uniform float radius;
|
||||
varying vec3 fragPosition;
|
||||
varying vec2 fragTexCoord;
|
||||
varying vec4 fragColor;
|
||||
varying vec3 fragNormal;
|
||||
|
||||
// NOTE: Add here your custom variables
|
||||
|
||||
@@ -105,6 +106,7 @@ void main() {
|
||||
// Send vertex attributes to fragment shader
|
||||
fragPosition = vertexPosition + vertexPosition * vec3(cnoise(vec3(vertexNormal + vec3(frame))) * 0.5);
|
||||
fragColor = vertexColor;
|
||||
fragNormal = vertexNormal;
|
||||
fragTexCoord = vertexTexCoord;
|
||||
// Calculate final vertex position
|
||||
gl_Position = mvp * vec4(fragPosition , radius);
|
||||
|
||||
Reference in New Issue
Block a user