mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-30 00:41:33 +00:00
forgot adding a file
This commit is contained in:
parent
3f05aba76d
commit
ab8b74dcac
2 changed files with 19 additions and 1 deletions
|
@ -183,7 +183,7 @@ Ogre::MaterialPtr Water::createMaterial()
|
||||||
|
|
||||||
if (Settings::Manager::getBool("multiple render targets", "Render"))
|
if (Settings::Manager::getBool("multiple render targets", "Render"))
|
||||||
{
|
{
|
||||||
CompositorInstance* compositor = CompositorManager::getSingleton().getCompositorChain(mViewport)->getCompositor("gbuffer");
|
CompositorInstance* compositor = CompositorManager::getSingleton().getCompositorChain(mViewport)->getCompositor("gbuffer");
|
||||||
|
|
||||||
TexturePtr colorTexture = compositor->getTextureInstance("mrt_output", 0);
|
TexturePtr colorTexture = compositor->getTextureInstance("mrt_output", 0);
|
||||||
TextureUnitState* tus = mat->getTechnique(0)->getPass(0)->getTextureUnitState("refractionMap");
|
TextureUnitState* tus = mat->getTechnique(0)->getPass(0)->getTextureUnitState("refractionMap");
|
||||||
|
|
18
files/gbuffer/gbuffer.cg
Normal file
18
files/gbuffer/gbuffer.cg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
void RenderScene_vs(in float4 position : POSITION
|
||||||
|
,in float2 uv :TEXCOORD0
|
||||||
|
,uniform float4x4 wvp
|
||||||
|
,out float4 oPosition : POSITION
|
||||||
|
,out float2 oUV :TEXCOORD0)
|
||||||
|
{
|
||||||
|
oPosition = mul(wvp, position);
|
||||||
|
oUV = uv;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderScene_ps(in float4 position : POSITION
|
||||||
|
,in float2 uv :TEXCOORD0
|
||||||
|
,uniform sampler2D tex1 : TEXUNIT0
|
||||||
|
,out float4 oColor : COLOR)
|
||||||
|
{
|
||||||
|
float4 scene =tex2D(tex1, uv);
|
||||||
|
oColor= scene;
|
||||||
|
}
|
Loading…
Reference in a new issue