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