feat: some shit
This commit is contained in:
23
src/content/projects/plantarium/_components/Leaf.frag
Normal file
23
src/content/projects/plantarium/_components/Leaf.frag
Normal file
@@ -0,0 +1,23 @@
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
|
||||
uniform vec3 uBackground;
|
||||
|
||||
varying vec3 vNormal;
|
||||
varying vec2 vUv;
|
||||
varying float fog;
|
||||
|
||||
void main(){
|
||||
|
||||
vec3 normal=normalize(vNormal);
|
||||
|
||||
float lighting=dot(normal,normalize(vec3(-.3,.8,.6)));
|
||||
|
||||
vec3 col = (vec3(.308*vUv.x,.712,.5)+lighting*.5)-.25;
|
||||
/* gl_FragColor.rgb=vec3(vUv.x,vUv.y,vNormal.x); */
|
||||
gl_FragColor.rgb=mix(col, uBackground,fog);
|
||||
|
||||
gl_FragColor.a=1.;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user