Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 14,540 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Engine variables and multiple techniques #82745
07/23/06 19:54
07/23/06 19:54
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline OP
Expert
Excessus  Offline OP
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Say I have an .fx file with two techniques, TechniqueA and TechniqueB,

TechniqueA uses these constants passed by the engine:
const float4x4 matWorld;
const float4 vecSunDir;
const float4 vecSkill1;
const float4 vecSkill5;

TechniqueB only uses these constants:
const float4 vecSunDir;
const float4 vecSkill1;

If the hardware doesn't support TechniqueA, will the engine still bother setting/passing those unnused constants (and thus slow down the rendering process)?

Re: Engine variables and multiple techniques [Re: Excessus] #82746
07/23/06 21:45
07/23/06 21:45
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
I think it does most of the variables once per frame, some things per view or object if there is a material event.

Dont bother worrying, even if the engine pases in those variables, this is very fast as it is not a hardware state change... so basically it wont make any difference either way.

Something you should avoid however is constantly chnageing the texture in a material event, like if you render 50 trees, you shouldnt chnage the material texture for each one in a material event.. this is a state chnage and can be costly if done enough times.


Sphere Engine--the premier A6 graphics plugin.
Re: Engine variables and multiple techniques [Re: Matt_Aufderheide] #82747
07/23/06 22:12
07/23/06 22:12
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline OP
Expert
Excessus  Offline OP
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Ah ok, thanks for the info. I'm starting to get the hang of it..


Moderated by  Blink, Hummel, Superku 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1