浏览代码

Use corrected screen size for generating tile size

Screen size != actual size (texture)

Interestingly, this is 'mostly' right at this point.  The per-tile light lists for the right eye might not be exactly right, but the light data in the tile is correctly formatted.  So next is generating the correct information in the tile!
/main
Robert Srinivasiah 7 年前
当前提交
68890aea
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 12
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs

12
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs


int GetNumTileFtplX(HDCamera hdCamera)
{
return (hdCamera.actualWidth + (LightDefinitions.s_TileSizeFptl - 1)) / LightDefinitions.s_TileSizeFptl;
return ((int)hdCamera.screenSize.x + (LightDefinitions.s_TileSizeFptl - 1)) / LightDefinitions.s_TileSizeFptl;
return (hdCamera.actualHeight + (LightDefinitions.s_TileSizeFptl - 1)) / LightDefinitions.s_TileSizeFptl;
return ((int)hdCamera.screenSize.y + (LightDefinitions.s_TileSizeFptl - 1)) / LightDefinitions.s_TileSizeFptl;
return (hdCamera.actualWidth + (LightDefinitions.s_TileSizeClustered - 1)) / LightDefinitions.s_TileSizeClustered;
return ((int)hdCamera.screenSize.x + (LightDefinitions.s_TileSizeClustered - 1)) / LightDefinitions.s_TileSizeClustered;
return (hdCamera.actualHeight + (LightDefinitions.s_TileSizeClustered - 1)) / LightDefinitions.s_TileSizeClustered;
return ((int)hdCamera.screenSize.y + (LightDefinitions.s_TileSizeClustered - 1)) / LightDefinitions.s_TileSizeClustered;
}
public bool GetFeatureVariantsEnabled()

var camera = hdCamera.camera;
cmd.BeginSample("Build Light List");
var w = camera.pixelWidth;
var h = camera.pixelHeight;
var w = (int)hdCamera.screenSize.x;
var h = (int)hdCamera.screenSize.y;
s_TempIntArray[0] = w;
s_TempIntArray[1] = h;
var numBigTilesX = (w + 63) / 64;

正在加载...
取消
保存