|
|
|
|
|
|
|
|
SGT_FW
by Aku_Aku. 05/31/26 11:05
|
|
|
|
|
XTB
by pr0logic. 05/18/26 12:27
|
|
|
3 registered members (TipmyPip, Grant, 1 invisible),
3,415
guests, and 5
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
effect_load for string content
#369228
05/02/11 19:50
05/02/11 19:50
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Hi, I consider compiling shaders during runtime and I wanted to ask you, if you could modify effect_load or create a new funtion for loading shaders from STRING* or char* data. This way, I could add dynamic code in front of the first line of a .fx file, for instance #define's, which are being added due to Lite-C compiler defines (like disabling specific sections of a shader, because it is disabled in a Lite-C header file or in a options menu, e.g. low/high shader quality). Is that a reasonable feature suggestion? I hope so  best regards, -Christian
Last edited by HeelX; 05/02/11 19:52.
|
|
|
Re: effect_load for string content
[Re: DJBMASTER]
#369251
05/02/11 23:03
05/02/11 23:03
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
also, you could compile low and high versions of shaders to .fxo files(like ssao_low.fxo and ssao_high.fxo) and then define materials for each of them and select the according material according to shader quality settings.
3333333333
|
|
|
Re: effect_load for string content
[Re: Quad]
#369263
05/03/11 07:46
05/03/11 07:46
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
The user has to do this, because I rely on default.fx, which is different for A7 and A8 - so, if he uses A8, he can simply compile the shaders by himself. Also, I intend to concatenate a dynamically composed preamble of defines with a shader stub, that react on these defines. This way, Lite-C defines can be passed on startup to the shader code and optimized version can be compiled then. Also, if I pass static variables (like blur radius, blur samples, AO approximation passes, etc.) this way to a shader, things will get optimized, too.
I also intend to design my framework so that if some values change, shaders are getting re-compiled, like blur quality, etc. This way, I write a shader once and if the gamers wants a different shader quality (for, e.g, speed reasons), the user can pass this through a function to my solution and the very special shader gets re-compiled with the new settings. I also target to replace the different object shaders for my extra render views with one file for all and compile them differently for each object type.
Last edited by HeelX; 05/03/11 07:47.
|
|
|
|