Effect Function Syntax (Direct3D 9)
A function is the building block for a shader created in the high-level language. If you prefer to write shaders in a C-style language instead of in assembly language, you will want to write functions.
Syntax
type id ( [ parameters ] )
{ body }
Functions do not change parameter values in an effect.
- type - Any valid Reference for HLSL type.
- id - A unique name.
- parameters - Function parameters.
- body - The body of the function.
Functions are built from the high-level language. See Reference for HLSL.
Related topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for