≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
How send JS variable into HLSL fragmentShader part?
Posted by:
(you are not logged in)
Enter the missing letter in: "Intern?tional"
(you are not logged in)
Text:
[quote][b][/b] wrote: Just declare the [code] float4 abc ;[/code] below or above the "Sampler2D tex0" and then use [b]float alpha = abc.w;[/b] If you don't want to use float4 then in your shader callback, degine the value abc as the first parameter instead of 4th. Then in your fragment shader you can define it as [code]float abc;[/code] instead of float4 and then you don't have to use the subscript "abc.w" whenever you use this in your shader code, you can simply call it by "abc" It seems a bit complicated but once you understand it, it will be an ease for you to do stuff that way. You can watch my HLSL shader video on youtube to understand how shader works in CopperCube.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact