summaryrefslogtreecommitdiffhomepage
path: root/examples/models/models_material_pbr.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2017-07-19 10:09:34 +0200
committerraysan5 <[email protected]>2017-07-19 10:09:34 +0200
commitd368403a131522a53c0dedd1ae4f24301898e96e (patch)
treea2b92ba988d4d3c6d7cc8d489b94632b449d578e /examples/models/models_material_pbr.c
parent8f569e59b177e879fe350027a706c6f731f86c4a (diff)
downloadraylib-d368403a131522a53c0dedd1ae4f24301898e96e.tar.gz
raylib-d368403a131522a53c0dedd1ae4f24301898e96e.zip
Working on PBR materials, renamed some data
Diffstat (limited to 'examples/models/models_material_pbr.c')
-rw-r--r--examples/models/models_material_pbr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/models/models_material_pbr.c b/examples/models/models_material_pbr.c
index 9380bd91..5761b2af 100644
--- a/examples/models/models_material_pbr.c
+++ b/examples/models/models_material_pbr.c
@@ -58,18 +58,18 @@ int main()
Texture2D texHDR = LoadTexture("resources/pinetree.hdr");
model.material = LoadMaterialPBR(texHDR, (Color){ 255, 255, 255, 255 }, 1.0f, 1.0f);
- SetMaterialTexture(&model.material, TEXMAP_ALBEDO, LoadTexture("resources/pbr/trooper_albedo.png"));
- SetMaterialTexture(&model.material, TEXMAP_NORMAL, LoadTexture("resources/pbr/trooper_normals.png"));
- SetMaterialTexture(&model.material, TEXMAP_METALNESS, LoadTexture("resources/pbr/trooper_metalness.png"));
- SetMaterialTexture(&model.material, TEXMAP_ROUGHNESS, LoadTexture("resources/pbr/trooper_roughness.png"));
- SetMaterialTexture(&model.material, TEXMAP_OCCLUSION, LoadTexture("resources/pbr/trooper_ao.png"));
+ SetMaterialTexture(&model.material, MAP_ALBEDO, LoadTexture("resources/pbr/trooper_albedo.png"));
+ SetMaterialTexture(&model.material, MAP_NORMAL, LoadTexture("resources/pbr/trooper_normals.png"));
+ SetMaterialTexture(&model.material, MAP_METALNESS, LoadTexture("resources/pbr/trooper_metalness.png"));
+ SetMaterialTexture(&model.material, MAP_ROUGHNESS, LoadTexture("resources/pbr/trooper_roughness.png"));
+ SetMaterialTexture(&model.material, MAP_OCCLUSION, LoadTexture("resources/pbr/trooper_ao.png"));
// Set textures filtering for better quality
- SetTextureFilter(model.material.maps[TEXMAP_ALBEDO].tex, FILTER_BILINEAR);
- SetTextureFilter(model.material.maps[TEXMAP_NORMAL].tex, FILTER_BILINEAR);
- SetTextureFilter(model.material.maps[TEXMAP_METALNESS].tex, FILTER_BILINEAR);
- SetTextureFilter(model.material.maps[TEXMAP_ROUGHNESS].tex, FILTER_BILINEAR);
- SetTextureFilter(model.material.maps[TEXMAP_OCCLUSION].tex, FILTER_BILINEAR);
+ SetTextureFilter(model.material.maps[MAP_ALBEDO].texture, FILTER_BILINEAR);
+ SetTextureFilter(model.material.maps[MAP_NORMAL].texture, FILTER_BILINEAR);
+ SetTextureFilter(model.material.maps[MAP_METALNESS].texture, FILTER_BILINEAR);
+ SetTextureFilter(model.material.maps[MAP_ROUGHNESS].texture, FILTER_BILINEAR);
+ SetTextureFilter(model.material.maps[MAP_OCCLUSION].texture, FILTER_BILINEAR);
int renderModeLoc = GetShaderLocation(model.material.shader, "renderMode");
SetShaderValuei(model.material.shader, renderModeLoc, (int[1]){ 0 }, 1);