I am trying to load a Texture into a Shader via ShaderUniform, as shown in the API:
graphics.shaderUniform("_t_texture", "vispath:data.png")
So, I have added uniform sampler2D _t_Sterne to the Fragment Shader and the Vertex Shader (I suppose both need it), further down in the Fragment Shader I call the Texture via vec4 Sterne = texture2D(_t_Sterne, fract(uvVarying.xy)), then adding it to the Result. In the Script executing the Shader I have written the Following:
local eff = shaderCompile(Shaders["Wolkenshader02"].Compiled)
Objects[obj].ShaderSet = eff
graphics.shaderUniform(eff, "_t_Sterne", "vispath:graphics/bg/sterne_generell01b.png")
I am sure the Path is correct, and I suppose that the Way I have written the shaderUniform (prefixing the Name with "_t_") might be correct, but I am not entirely sure. I have also tried around with Variations of the Code, in the Script and in the Shader, but it doesn't work.
Additionally, I actually had my Shader set up in the Form that is using the Shader-Toolkit, in Order to use the automatically updating bind()-Function, and I would prefer to let it stay that Way, but it looks like the bind()-Function won't accept such Texture-Input. My Script thusly looks like this:
local obj = "QuistaClouds"
local eff = "Wolkenshader02"
shaderRemoveEffect(eff)
bind(eff, "time", field("getTime()*0.001"))
bind(eff, "SunX", field("0.115"))
bind(eff, "daytime", field("Values.Daytime.Int * 0.0125"))
bind(eff, "daytimeFine", field("Values.DaytimeFine.Int * 0.00001"))
shader_effects[eff] = { shader = Shaders[eff].Compiled }
shaderAddEffect(eff)
shaderRemoveEffect(eff)
Objects[obj].ShaderSet = shader_effects[eff].num.num
So, how do I use ShaderUniform (or possibly even bind()) to input a Texture? What is it that doesn't work about the Method I have tried?