shader - webgl2 - glmatrix 2 - How to make shadow -
for webgl2 project use code based on tappali ekanathan keestu https://github.com/keestu/webgl original .
i have success push , pop matrix , multi textures , lights etc.. .
little :
initial (creating objects)
app/adding_geometry.js
lib/matrix-world.js
create buffers :
lib/matrix-buffers.js
draws :
lib/matrix-draws.js
shaders initial data intro : shaders.html
but objects textures have override shaders regenerateshader
i share demo link online test.
demo page :
moving object example :
var textuteimagesamplers = { source : [ "res/images/complex_texture_1/diffuse.png" , "res/images/complex_texture_1/heightmap.png" , "res/images/complex_texture_1/normalmap.png" ] , mix_operation : "multiply" , // enum : multiply , divide , }; world.add("cubelighttex", 1 , "mycubetex" , textuteimagesamplers ); app.scene.mycubetex.position.sety(1);
Comments
Post a Comment