@@ -247,13 +247,21 @@ private void RenderCubemapGGXConvolution(Texture input, RenderTexture target, Re
247
247
}
248
248
249
249
// Copy the first mip.
250
+
251
+ // TEMP code until CopyTexture is implemented for command buffer
250
252
// All parameters are neutral because exposure/multiplier have already been applied in the first copy.
251
253
SkyParameters skyParams = new SkyParameters ( ) ;
252
254
skyParams . exposure = 0.0f ;
253
255
skyParams . multiplier = 1.0f ;
254
256
skyParams . rotation = 0.0f ;
255
257
skyParams . skyHDRI = input ;
256
258
RenderSkyToCubemap ( skyParams , target , renderLoop ) ;
259
+ // End temp
260
+
261
+ //
262
+ //for (int f = 0; f < 6; f++)
263
+ // Graphics.CopyTexture(input, f, 0, target, f, 0);
264
+
257
265
258
266
// Do the convolution on remaining mipmaps
259
267
float invOmegaP = ( 6.0f * input . width * input . width ) / ( 4.0f * Mathf . PI ) ; // Solid angle associated to a pixel of the cubemap;
@@ -270,8 +278,7 @@ private void RenderCubemapGGXConvolution(Texture input, RenderTexture target, Re
270
278
for ( int face = 0 ; face < 6 ; ++ face )
271
279
{
272
280
Utilities . SetRenderTarget ( renderLoop , target , mip , ( CubemapFace ) face ) ;
273
- Camera faceCamera = m_CubemapFaceCamera [ face ] . GetComponent < Camera > ( ) ;
274
-
281
+
275
282
var cmd = new CommandBuffer { name = "" } ;
276
283
cmd . DrawMesh ( m_CubemapFaceMesh [ face ] , Matrix4x4 . identity , m_GGXConvolveMaterial , 0 , 0 , propertyBlock ) ;
277
284
renderLoop . ExecuteCommandBuffer ( cmd ) ;
0 commit comments