Implement the lit
HLSL Function
#99135
Labels
backend:DirectX
backend:SPIR-V
bot:HLSL
HLSL
HLSL Language Support
metabug
Issue to collect references to a group of similar or related issues.
hlsl_intrinsics.h
lit
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
clang/test/CodeGenHLSL/builtins/lit.hlsl
clang/test/SemaHLSL/BuiltIns/lit-errors.hlsl
llvm/test/CodeGen/SPIRV/hlsl-intrinsics/lit.ll
DirectX
SPIR-V
FMax:
Description:
FMax
Result is y if x < y; otherwise result is x. Which operand is
the result is undefined if one of the operands is a NaN.
The operands must all be a scalar or vector whose component type is
floating-point.
Result Type and the type of all operands must be the same type.
Results are computed per component.
40
<id>
x
<id>
y
Test Case(s)
Example 1
HLSL:
Returns a lighting coefficient vector.
This function returns a lighting coefficient vector (ambient, diffuse, specular, 1) where:
Where the vector n is the normal vector, l is the direction to light and h is the half vector.
Parameters
Return Value
The lighting coefficient vector.
Type Description
Minimum Shader Model
This function is supported in the following shader models.
See also
Intrinsic Functions (DirectX HLSL)
The text was updated successfully, but these errors were encountered: