Hello, ET mates.
During last half-month, I've learned a new for me thing, reading MG discussions.
It appears to be, that one can edit *.FX-files (not new idea, but now it captured me).
So the question: where can be found any information, how these files organized?
Thanks in advance.
Page 1 of 1
Shader (*.FX-files) syntax. Is there any tutorial/samples?
#2
Posted 28 March 2023 - 08:45 AM
Weter, on 28 March 2023 - 07:25 AM, said:
Hello, ET mates.
During last half-month, I've learned a new for me thing, reading MG discussions.
It appears to be, that one can edit *.FX-files (not new idea, but now it captured me).
So the question: where can be found any information, how these files organized?
Thanks in advance.
During last half-month, I've learned a new for me thing, reading MG discussions.
It appears to be, that one can edit *.FX-files (not new idea, but now it captured me).
So the question: where can be found any information, how these files organized?
Thanks in advance.
Just as a first step, the language used in the .FX files is called HLSL. Here's a reference:
https://learn.micros...x-graphics-hlsl
#3
Posted 28 March 2023 - 08:55 AM
Hello, Wayne.
Thanks. So it's a kind of program file.
Thanks. So it's a kind of program file.
#4
Posted 28 March 2023 - 11:42 AM
Weter, on 28 March 2023 - 08:55 AM, said:
Hello, Wayne.
Thanks. So it's a kind of program file.
Thanks. So it's a kind of program file.
Yes, its a sequence of instructions to tell the GPU what to do for every pixel of your object.
eg for every pixel on the mesh,
- open a texture file
- look up the color that corresponds to the pixel I am drawing
- see if the color alpha is transparent
- if so skip the rest of the program
- look at the angle of the sun
- figure out how much the pixel should be brightened
- look at the shadow locations
- figure out how much the pixel should be darkened
- write the final pixel to the screen buffer
etc
Page 1 of 1