On Tue, 2 Aug 2022 18:01:06 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:
>> Nir Lisker has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Renamed method > > modules/javafx.graphics/src/main/native-prism-d3d/hlsl/vs2ps.h line 38: > >> 36: float3 worldVecToEye : texcoord2; >> 37: float3 worldVecsToLights[nLights] : texcoord3; // 3, 4, 5 >> 38: float3 worldNormLightDirs[nLights] : texcoord6; // 6, 7, 8 > > This is an existing behavior, and I just want to open it for discussion and > bring it to your consideration for future changes. > These are per vertex attributes and they may cause un-required > processing/overhead during rasterization. > In a regular scenario where only one light i.e. default light is set, the > other two values in these arrays are reset and are unused in pixel shader. > But rasterizer interpolates these values for all pixel and pass them as input > to pixel shader. > May be in future we can find a way to avoid this. I think that when the strict limit of 3 lights is removed then we will touch this as well. ------------- PR: https://git.openjdk.org/jfx/pull/789