31SGBuffer::SGBuffer(Ogre::String gBufferId,
unsigned int gbufferMrtNumber) :
SData(gBufferId),
32 numberMrt(gbufferMrtNumber)
37SGBuffer::SGBuffer() :
SData(
""),
68Ogre::String SGBuffer::GenerateGBufferBaseMaterialPixelOutputStructure()
70 Ogre::StringStream ss;
72 ss <<
"/*" << std::endl;
73 ss <<
"Base interface for GBuffer data ordering abstraction" << std::endl;
74 ss <<
"*/" << std::endl;
75 ss <<
"interface I_GBufferPixelShaderOutput" << std::endl;
76 ss <<
"{" << std::endl;
77 ss <<
" /*!" << std::endl;
78 ss <<
" Initialize output to default values" << std::endl;
79 ss <<
" */" << std::endl;
80 ss <<
" void Reset();" << std::endl;
82 ss <<
" /*!" << std::endl;
83 ss <<
" Get the diffuse term" << std::endl;
84 ss <<
" */" << std::endl;
85 ss <<
" float3 GetDiffuse();" << std::endl;
87 ss <<
" /*!" << std::endl;
88 ss <<
" Set the diffuse term" << std::endl;
89 ss <<
" */" << std::endl;
90 ss <<
" void SetDiffuse(in float3 diffuse);" << std::endl;
92 ss <<
" /*!" << std::endl;
93 ss <<
" Get the specular term" << std::endl;
94 ss <<
" */" << std::endl;
95 ss <<
" float3 GetSpecular();" << std::endl;
97 ss <<
" /*!" << std::endl;
98 ss <<
" Set the specular term" << std::endl;
99 ss <<
" */" << std::endl;
100 ss <<
" void SetSpecular(in float3 specular);" << std::endl;
102 ss <<
" /*!" << std::endl;
103 ss <<
" Get the shininess term" << std::endl;
104 ss <<
" */" << std::endl;
105 ss <<
" float GetShininess();" << std::endl;
107 ss <<
" /*!" << std::endl;
108 ss <<
" Set the shininess term" << std::endl;
109 ss <<
" */" << std::endl;
110 ss <<
" void SetShininess(in float shininess);" << std::endl;
112 ss <<
" /*!" << std::endl;
113 ss <<
" Get the normal" << std::endl;
114 ss <<
" */" << std::endl;
115 ss <<
" float3 GetNormal();" << std::endl;
117 ss <<
" /*!" << std::endl;
118 ss <<
" Set the normal" << std::endl;
119 ss <<
" */" << std::endl;
120 ss <<
" void SetNormal(in float3 normal);" << std::endl;
122 ss <<
" /*!" << std::endl;
123 ss <<
" Get the depth" << std::endl;
124 ss <<
" */" << std::endl;
125 ss <<
" float GetDepth();" << std::endl;
127 ss <<
" /*!" << std::endl;
128 ss <<
" Set the depth" << std::endl;
129 ss <<
" */" << std::endl;
130 ss <<
" void SetDepth(in float depth);" << std::endl;
132 ss <<
" /*!" << std::endl;
133 ss <<
" Get the emissive term" << std::endl;
134 ss <<
" */" << std::endl;
135 ss <<
" float GetEmissive();" << std::endl;
137 ss <<
" /*!" << std::endl;
138 ss <<
" Set the emissive term" << std::endl;
139 ss <<
" */" << std::endl;
140 ss <<
" void SetEmissive(in float emissive);" << std::endl;
142 ss <<
" /*!" << std::endl;
143 ss <<
" Get the material id" << std::endl;
144 ss <<
" */" << std::endl;
145 ss <<
" float GetMaterialID();" << std::endl;
147 ss <<
" /*!" << std::endl;
148 ss <<
" Set the material id term" << std::endl;
149 ss <<
" */" << std::endl;
150 ss <<
" void SetMaterialID(in float materialId);" << std::endl;
152 ss <<
" /*!" << std::endl;
153 ss <<
" Get the velocity vector" << std::endl;
154 ss <<
" */" << std::endl;
155 ss <<
" float2 GetVelocity();" << std::endl;
157 ss <<
" /*!" << std::endl;
158 ss <<
" Set the velocity vector" << std::endl;
159 ss <<
" */" << std::endl;
160 ss <<
" void SetVelocity(in float2 velocity);" << std::endl;
161 ss <<
"};" << std::endl;
167Ogre::String SGBuffer::GenerateGBufferBaseCompositorPixelInputStructure()
169 Ogre::StringStream ss;
171 ss <<
"/*" << std::endl;
172 ss <<
"Base interface for GBuffer data ordering abstraction" << std::endl;
173 ss <<
"*/" << std::endl;
174 ss <<
"interface I_GBufferPixelShaderInput" << std::endl;
175 ss <<
"{" << std::endl;
177 ss <<
" /*!" << std::endl;
178 ss <<
" Get the diffuse term" << std::endl;
179 ss <<
" */" << std::endl;
180 ss <<
" float3 GetDiffuse(in float2 coordinate);" << std::endl;
182 ss <<
" /*!" << std::endl;
183 ss <<
" Get the specular term" << std::endl;
184 ss <<
" */" << std::endl;
185 ss <<
" float3 GetSpecular(in float2 coordinate);" << std::endl;
187 ss <<
" /*!" << std::endl;
188 ss <<
" Get the shininess term" << std::endl;
189 ss <<
" */" << std::endl;
190 ss <<
" float GetShininess(in float2 coordinate);" << std::endl;
192 ss <<
" /*!" << std::endl;
193 ss <<
" Get the normal" << std::endl;
194 ss <<
" */" << std::endl;
195 ss <<
" float3 GetNormal(in float2 coordinate);" << std::endl;
197 ss <<
" /*!" << std::endl;
198 ss <<
" Get the depth" << std::endl;
199 ss <<
" */" << std::endl;
200 ss <<
" float GetDepth(in float2 coordinate);" << std::endl;
202 ss <<
" /*!" << std::endl;
203 ss <<
" Get the emissive term" << std::endl;
204 ss <<
" */" << std::endl;
205 ss <<
" float GetEmissive(in float2 coordinate);" << std::endl;
207 ss <<
" /*!" << std::endl;
208 ss <<
" Get the material id" << std::endl;
209 ss <<
" */" << std::endl;
210 ss <<
" float GetMaterialID(in float2 coordinate);" << std::endl;
212 ss <<
" /*!" << std::endl;
213 ss <<
" Get the velocity vector" << std::endl;
214 ss <<
" */" << std::endl;
215 ss <<
" float2 GetVelocity(in float2 coordinate);" << std::endl;
217 ss <<
"};" << std::endl;
Ogre::uint32 GetChannels()
Ogre::String GenerateGBufferCompositorPixelInputStructure()
Ogre::String GetGBufferMaterialPixelOutputStructureTypeName()
unsigned int GetNumberMrt() const
Ogre::String GenerateGBufferMaterialPixelOutputStructure()
@ SO3_GBUFFER_MANDATORY_MASK
virtual Ogre::String GenerateGBufferCompositorPixelInputStructureImpl()=0
virtual Ogre::String GenerateGBufferMaterialPixelOutputStructureImpl()=0
virtual Ogre::String GetGBufferMaterialPixelOutputStructureTypeNameImpl()=0
virtual Ogre::String GetGBufferCompositorPixelInputStructureTypeNameImpl()=0
Ogre::String GetGBufferCompositorPixelInputStructureTypeName()