Difference between revisions of "PBR"

From Empires Wiki
Jump to: navigation, search
Line 1: Line 1:
Physicall based rendering shader.
+
Physically based rendering shader. Source code is available at: https://github.com/thexa4/source-pbr
  
 
== Parameters ==
 
== Parameters ==
Line 10: Line 10:
 
* %keywords - A list of keywords separated by commas, should contain 'empires' as first element. Examples of keywords are: architectural,brown,gray,grime,hanger,industrial,metal,modern,shed,urban,wall,floor
 
* %keywords - A list of keywords separated by commas, should contain 'empires' as first element. Examples of keywords are: architectural,brown,gray,grime,hanger,industrial,metal,modern,shed,urban,wall,floor
 
* $basetexturetransform - Looks like this: "center 0.5 0.5 scale 0.1025 0.1025 rotate 0 translate 0 0" for a 2m by 2m texture.
 
* $basetexturetransform - Looks like this: "center 0.5 0.5 scale 0.1025 0.1025 rotate 0 translate 0 0" for a 2m by 2m texture.
 +
 +
== Integrating in your mod ==
 +
The shader is built on top of the [https://github.com/ValveSoftware/source-sdk-2013/ Base SDK github code]. If you continued working on top of that and still use git, you can merge in this change: https://help.github.com/articles/syncing-a-fork/
 +
 +
== Getting help ==
 +
If you need help or have suggestions, please contact @Thexa4 on the [https://discord.gg/UH6Sc6B Empires Discord] or the [https://discord.gg/wpFf2f6 Source Modding Community].

Revision as of 04:19, 22 January 2019

Physically based rendering shader. Source code is available at: https://github.com/thexa4/source-pbr

Parameters

  • $basetexture - The albedo texture
  • $normaltexture - The normal map
  • $mraotexture - A texture with the metalness on the red channel, roughness on the green channel and ambient occlusion on the blue channel.
  • $envmap - Must be set to "env_cubemap"
  • $pbrlookup - Must be set to "dev/pbr_lookup"
  • $surfaceprop - One of the following: https://developer.valvesoftware.com/wiki/$surfaceprop
  •  %keywords - A list of keywords separated by commas, should contain 'empires' as first element. Examples of keywords are: architectural,brown,gray,grime,hanger,industrial,metal,modern,shed,urban,wall,floor
  • $basetexturetransform - Looks like this: "center 0.5 0.5 scale 0.1025 0.1025 rotate 0 translate 0 0" for a 2m by 2m texture.

Integrating in your mod

The shader is built on top of the Base SDK github code. If you continued working on top of that and still use git, you can merge in this change: https://help.github.com/articles/syncing-a-fork/

Getting help

If you need help or have suggestions, please contact @Thexa4 on the Empires Discord or the Source Modding Community.