Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 877 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | chip programmers | 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