Eevee: World nodetree gpumaterial compatibility.

- Unify GPUMaterial creation (world/mesh).
- Support for multiple shader variations (not used for now).
- Convert GPUInputs to DRWUniforms to be used with the draw manager.
- Nodetree Update is not supported. The only way to refresh the shaders is to change render engine.
- Cleanup in GPUPass.
- Add new temporary Node Compatibility type. Compatibility types should be removed in the future.
This commit is contained in:
2017-04-27 22:27:09 +02:00
parent 2f100c13ee
commit e868b459bb
15 changed files with 333 additions and 30 deletions

View File

@@ -3,9 +3,11 @@ uniform vec3 diffuse_col;
uniform vec3 specular_col;
uniform int hardness;
out vec4 FragColor;
void main()
{
float roughness = 1.0 - float(hardness) / 511.0;
roughness *= roughness;
fragColor = vec4(eevee_surface_lit(worldNormal, diffuse_col, specular_col, roughness), 1.0);
FragColor = vec4(eevee_surface_lit(worldNormal, diffuse_col, specular_col, roughness), 1.0);
}