Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Shader : change a parameter

Author
Message
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 27th Nov 2014 14:47
Hi

I'm trying to change a parameter in a shader :


If I change the two first line by :


It works fine, I have the brighness of 1.0 and the contrast of 5.0.
But If I want to change dynamically in AGk by :



How can i change the brightness and contrast of the sahder in real time ?

Thank you for your answer.

http://www.dracaena-studio.com
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Nov 2014 15:04 Edited at: 27th Nov 2014 15:05
I think you need to set them up as:


http://www.appgamekit.com/documentation/Reference/3D/SetShaderConstantByName.htm
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 27th Nov 2014 15:06 Edited at: 27th Nov 2014 18:09
Hi Blendman,

Try:


[Edit]Aw baxslash was faster[/Edit]

Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 27th Nov 2014 18:01 Edited at: 27th Nov 2014 19:07
oh, thanks, it works (i'm a noob in shader, but I learn it ^^).

http://www.dracaena-studio.com

Login to post a reply

Server time is: 2024-11-25 11:40:44
Your offset time is: 2024-11-25 11:40:44