[SOLVED] Shader function "sample2DTextureVec3" not working anymore...
Posted: Sun Mar 29, 2020 7:46 pm
Hi, I'm trying to export an Indigo scene from my CAD application.
The shader below does't work anymore (it worked with an older Indigo version)
This is the shader.
I've done some test, the shader works, is the function "sample2DTextureVec3" that seems to always return (0,0,0)
Please help !!
Thank you
Antonio
The shader below does't work anymore (it worked with an older Indigo version)
This is the shader.
I've done some test, the shader works, is the function "sample2DTextureVec3" that seems to always return (0,0,0)
Please help !!
Thank you
Antonio
Code: Select all
<material> <!-- IgsMaterialType : "IgsDiffuse" -->
<name>Material_12</name>
<diffuse>
<texture>
<!-- TextureMap[0] : "Immagine primaria" -->
<uv_set>default</uv_set>
<path>.\MAINA SALA (baco)\MATTONI%20PIETRA%20ECRU_BUMP_IMG1.bmp</path>
<exponent>2.2</exponent>
<b>1</b>
<c>0</c>
</texture>
<texture>
<!-- TextureMap[1] : "Mappa livello bumping" -->
<uv_set>uv_set1</uv_set>
<path>.\MAINA SALA (baco)\MATTONI%20PIETRA%20ECRU_BUMP_BUMP.bmp</path>
<exponent>2.2</exponent>
<b>0.001000</b>
<c>0</c>
</texture>
<albedo>
<shader>
<shader>
<![CDATA[
def multiplyColor(vec3 col1, vec3 col2) vec3: vec3(mul(doti(col1),doti(col2)),mul(dotj(col1),dotj(col2)),mul(dotk(col1),dotk(col2)))
def eval(vec3 pos) vec3 : multiplyColor(sample2DTextureVec3(0,getTexCoords(0)),vec3(0.992157,0.960784,0.901961))
]]>
</shader>
</shader>
</albedo>
<bump>
<texture>
<texture_index>1</texture_index>
</texture>
</bump>
</diffuse>
</material>