It’s hard to say, but most likely no… the rest of my response will be more of a general statement about the subject…
Shaders can be specified on a per entity basis. So in theory you could do some really wacky things there. Just as a more practical example the “ghost” entities use a shader to give them that transparent look.
They simply just create a new vec4
with a different alpha component then the one that is passed to the shader, they instead rely on a uniform
that is set by a material.
--stonehearth\data\horde\materials\ghost_item.xml
<Uniform name="alpha" d="0.3" />
--stonehearth\data\horde\shaders\ghost_item.shader
float4 alpha = { 0, 0, 0, 0.5 };
...
void main() {
outColor = vec4(color.rgb, alpha.a);
--stonehearth\renderers\ghost_form\ghost_form_renderer.luac
local GhostFormRenderer=class()
function GhostFormRenderer:initialize(render_entity,ghost_form)
render_entity:set_material_override('materials/ghost_item.xml')
end
return GhostFormRenderer
My point being is that we are seeing ways to interact with shaders, if these get expanded in the future we could see some really really cools things.
For example if we could set unfiorm
's in shaders right now from lua, you could create something that has an animated rainbow color moving across it.
But still in the end the data needs to be there for us to interact with, which basically would mean that Radiant would have to be on board with the idea. Otherwise the idea of binding a texture around something would be impossible.
I can’t say at all if you write shader code, create a material, and a custom client renderer for an entity that the game will actually load it and use it, but in theory it should. And the fact that it exists may hint towards full support later in the future,
Take though what I’ve said with a hint of salt… I am new to OpenGL and GLSL, and there’s a lot of internal stuff Radiant is doing on the c++ side that we can’t see.
Also another good point to bring up is right now you can create qb matrices from lua code… this is effectively how the ladders are stretched out up and down walls.
Again showing interesting support as creating a qb matrix from lua would involve a bunch of OpenGL calls at some point. So who really knows where the support will end…
Personally I would like the ability to issue my own OpenGL calls… but don’t think that is ever coming.
sorry if this post is too techy… if you have any questions I’ll do my best to answer them. I am just really excited about the possibilities if we got really good support from Radiant in this area
for example take a look at what people have accomplished in the Minecraft modding community thanks to forge and access to OpenGL