On Sat, 30 Jul 2022 10:48:07 GMT, Nir Lisker <nlis...@openjdk.org> wrote:

>> modules/javafx.graphics/src/main/native-prism-d3d/hlsl/psMath.h line 98:
>> 
>>> 96:  * specular component. The computation is done in world space.
>>> 97:  */
>>> 98: void computeLight(float i, float3 n, float3 refl, float specPower, 
>>> float3 toLight, float3 lightDir, in out float3 d, in out float3 s) {
>> 
>> `toLight` -> `vertexToLightVec` ?
>
> The computation at this point is for pixels, and the argument type tells you 
> if it's a vector (`float3`). When working with fields in the shaders' 
> input/output it was convenient to be more descriptive with the names. Here 
> everything is confined, so I don't think the descriptive names help much. Can 
> still do a naming pass on these if you want.

Agreed, `vertexToLightVec` does not fit here. I am not able to convince myself 
with naming pass. I guess the variable which have proper names are fine. May be 
rename the variable that are single lettered, Leaving it to you.

-------------

PR: https://git.openjdk.org/jfx/pull/789

Reply via email to