1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:59:56 +00:00
openmw/files/shaders/openmw_fragment_multiview.glsl

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
999 B
Text
Raw Normal View History

2022-04-24 15:29:16 +00:00
#version 330 compatibility
#extension GL_OVR_multiview : require
#extension GL_OVR_multiview2 : require
#extension GL_EXT_texture_array : require
#include "openmw_fragment.h.glsl"
uniform sampler2DArray reflectionMap;
vec4 mw_sampleReflectionMap(vec2 uv)
{
return texture2DArray(reflectionMap, vec3((uv), gl_ViewID_OVR));
}
#if @refraction_enabled
uniform sampler2DArray refractionMap;
uniform sampler2DArray refractionDepthMap;
vec4 mw_sampleRefractionMap(vec2 uv)
{
return texture2DArray(refractionMap, vec3((uv), gl_ViewID_OVR));
}
float mw_sampleRefractionDepthMap(vec2 uv)
{
return texture2DArray(refractionDepthMap, vec3((uv), gl_ViewID_OVR)).x;
}
2022-05-14 01:58:00 +00:00
#endif
uniform sampler2DArray omw_SamplerLastShader;
vec4 mw_samplerLastShader(vec2 uv)
{
return texture2DArray(omw_SamplerLastShader, vec3((uv), gl_ViewID_OVR));
2022-07-09 20:21:48 +00:00
}
#if @skyBlending
uniform sampler2DArray sky;
vec3 mw_sampleSkyColor(vec2 uv)
{
return texture2DArray(sky, vec3((uv), gl_ViewID_OVR)).xyz;
}
#endif