Sign in to follow this  
Pryme8

set uniform value on Custom Standard Material

Recommended Posts

when doing something like this:
 

var mat = new BABYLON.CustomMaterial("cMat",scene);
mat.Fragment_Definitions(
`uniform float time;`
)
mat.Fragment_Before_FragColor(
`color.r = sin(time);`
);

how do I set the time float now?
if it was a shaderMaterial it would be .setFloat but that is not an option here.

I tried onBindObserverable.add(function(effect){
effect.setFloat...
})


*EDIT* I found the answer. On one of @NasimiAsl's examples 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.