File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -331,18 +331,20 @@ static RefCntAutoPtr<ITextureView> CreateWhiteFurnaceEnvMap(IRenderDevice* pDevi
331
331
TexDesc.Type = RESOURCE_DIM_TEX_CUBE;
332
332
TexDesc.Usage = USAGE_IMMUTABLE;
333
333
TexDesc.BindFlags = BIND_SHADER_RESOURCE;
334
- TexDesc.Format = TEX_FORMAT_RGBA32_FLOAT;
334
+ // R32 float is not supported on some low-end devices.
335
+ // Since we simply need environment map to be 1.0, RGBA8 is sufficient.
336
+ TexDesc.Format = TEX_FORMAT_RGBA8_UNORM;
335
337
TexDesc.Width = 16 ;
336
338
TexDesc.Height = 16 ;
337
339
TexDesc.MipLevels = 1 ;
338
340
TexDesc.ArraySize = 6 ;
339
341
340
- std::vector<float4 > Data (6 * TexDesc.Width * TexDesc.Height , float4{ 1 } );
342
+ std::vector<Uint32 > Data (6 * TexDesc.Width * TexDesc.Height , 0xFFFFFFFFu );
341
343
std::vector<TextureSubResData> SubResData (6 );
342
344
for (auto & Subres : SubResData)
343
345
{
344
346
Subres.pData = Data.data ();
345
- Subres.Stride = TexDesc.Width * sizeof (float4 );
347
+ Subres.Stride = TexDesc.Width * sizeof (Uint32 );
346
348
}
347
349
TextureData InitData{SubResData.data (), static_cast <Uint32>(SubResData.size ())};
348
350
You can’t perform that action at this time.
0 commit comments