Code: Select all
//Fake simple environment map reflection shader mod by Darkcrafter_VTar
//Based on Elementalism water shader made in a Marisa shader fashion
//This time allows mixing base texture and reflections
//material.Base * by a decimal value - adjusts brightness of base texture (albedo)
//addEnv * by a decimal value - adjust brightness of a reflective texture (fake env map)
Material material;
void SetupMaterial(inout Material material)
{
vec2 texCoord = vTexCoord.st;
material.Base = getTexel(texCoord);
vec4 addEnv = texture(tex_envmap, (normalize(uCameraPos.xyz - pixelpos.xyz).xy));
material.Base = (material.Base*0.7) + (addEnv*0.3);
}
Code: Select all
material texture "DEM1_5"
{
Shader "shaders/EnvMapReflFake.gl"
texture tex_envmap "Textures/Environments/Your_Environment_Map_Name.jpg"
}
Code: Select all
material texture "Models/Floors/DEM1_5_On_My_Model.png"
{
Shader "shaders/EnvMapReflFake.gl"
texture tex_envmap "Textures/Environments/Your_Environment_Map_Name.jpg"
}
The shader example, short test map, screenshot here