Material - Basic normal detail: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Lou Montana (talk | contribs) m (Text replacement - ";[ ]+ " to "; ") |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
=== Material with Normal map detail texture, speculars only per vertex === | |||
===Material with Normal map detail texture, speculars only per vertex=== | |||
Combines possibilities of NormalMap and DetailTexture. Yet per pixel specularity isn't possible. | Combines possibilities of NormalMap and DetailTexture. Yet per pixel specularity isn't possible. | ||
SpecularPower = '''10'''; | SpecularPower = '''10'''; | ||
''/*value 0 causes errors in illumination accuracy because there is no special nonspecular variant of this shader, | ''/*value 0 causes errors in illumination accuracy because there is no special nonspecular variant of this shader, | ||
''which would be used when specularPower = 0. Incorrectly is used angle^0 which is always 1 so that we have constant specular gain | ''which would be used when specularPower = 0. Incorrectly is used angle^0 which is always 1 so that we have constant specular gain | ||
Line 20: | Line 19: | ||
up[]={0,1,0}; | up[]={0,1,0}; | ||
dir[]={0,0,1}; | dir[]={0,0,1}; | ||
pos[]={0,0,0}; | pos[]={0,0,0}; | ||
}; | }; | ||
}; | }; |
Latest revision as of 00:54, 8 August 2021
Material with Normal map detail texture, speculars only per vertex
Combines possibilities of NormalMap and DetailTexture. Yet per pixel specularity isn't possible.
SpecularPower = 10; /*value 0 causes errors in illumination accuracy because there is no special nonspecular variant of this shader, which would be used when specularPower = 0. Incorrectly is used angle^0 which is always 1 so that we have constant specular gain Easily fixable by setting values specular to 0 and specularPower to reasonable value around 10 which would disable specularity.*/ PixelShaderID="NormalMapDiffuse"; VertexShaderID="NormalMapDiffuse"; class Stage1 { texture="ofp2\Vehicles\Land\Wheeled\LandRover\LR_op_1\Data\lr_op_hullb_NS.paa"; // path to normal map texture. NS maps with alphou can't be used here. uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; class Stage2 { texture="ofp2\vehicles\land\wheeled\landrover\lr_op_1\data\skrabance3_detail.paa"; // path to detail texture uvSource="tex"; class uvTransform { aside[]={12,0,0}; // multiplication and offset UV coordinate (transformation matrix) up[]={0,12,0}; dir[]={0,0,12}; pos[]={0,0,0}; }; };