This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.
See the Indie Bundle Try it for freetint is 0xBGR I think. for some reason red & blue are not in the correct order they are supposed to be, so red would be something along the lines of 0x00ff00 instead of 0xff0000.I am aware of that (in BGR Red would be 0x0000ff), but that is not my Problem. I just do not know how to visualize the Value so I can check what it looks like, because I have to assume the Conversion Code cannot handle it, and if I depict tostring(Characters["Player"].Tint) in an Object Text via <vs> (since I cannot seem to make Sense of the print-Function in Visionaire), I only get -1 or nil as a Result. Depicting or utilizing (in the Shader) a manually written Hex-Code is no Problem, so I have to assume there is something odd about the Tint's Format, and it is not just that it is BGR.
Values.DebugText.String = tostring(Erlene.Tint)
hex = tostring(Erlene.Tint):gsub("0x","")
graphics.shaderUniform(eff, "ObjTint", {
tonumber("0x"..hex:sub(1,2)),
tonumber("0x"..hex:sub(3,4)),
tonumber("0x"..hex:sub(5,6))
} );it seems to be -1 for default tint (aka no tint) otherwise if you were to assign a red tint with 0x0000ff, then it would return 255 which I think is the alpha equivalent of hex?Though I have just tried and turned off the Shader-Script entirely, then told Visionaire to wait two Seconds before executing Values.DebugText.String = tostring(Erlene.Tint), and then after another short Pause told it to give show me <vs=debugtext>, and although without the Shader I can clearly see the Character being tinted according to the Lightmap, the Value I am shown is still "-1". So, it must be something other than Default-Tint aka. no Tint...<div>
graphics.shaderUniform(eff, "ObjPosX", Characters["Player"].Position.x /1920);
graphics.shaderUniform(eff, "ObjPosY", Characters["Player"].Position.y /1080);
graphics.shaderUniform(eff, "_t_LightmapTex", game.CurrentScene.LightMap) uniform sampler2D LightmapTex;
uniform float ObjPosX;
uniform float ObjPosY;
...
vec3 Lightmap = texture2D(LightmapTex, uvVarying / vec2(1920,1080) + vec2(ObjPosX,ObjPosY) ).rgb;
result.rgb *= Lightmap;