≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Shader question
Posted by:
(you are not logged in)
Enter the missing letter in: "Internation?l"
(you are not logged in)
Text:
[quote][b]sven[/b] wrote: I am playing around with CC and shaders and have some questions.. With DirectX i can mix textures in shader..(example) //3 textures pass to the shader.. sampler2D tx0; sampler2D tx1; sampler2D tx2; //Mix them (just for testing no real use for it) float4 col1 = tex2D( tx0, TexCoord ); float4 col2 = tex2D( tx1, TexCoord ); float4 col3 = tex2D( tx2, TexCoord ); Output.RGBColor = (col1+col2+col3) - pulse ; //works as "expected".. //problem here.. with OpenGL: //2 textures uniform sampler2D tx0; uniform sampler2D tx1; vec4 col1 = texture2D(tx0 vec2(gl_TexCoord[0])); vec4 col2 = texture2D(tx1, vec2(gl_TexCoord[0])); gl_FragColor = col1+col2; //Has no effect.. I prefer to use opengl for shaders thats y i ask -what am i doing wrong here. I use same scenenode with 3 textures that i have added with irrEdit options with DX version i see that textures are used and mixed.. with GL i see only one texture and no mix with second one (no effect at all -no errors).[/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