Texture refactor
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
This commit is contained in:
parent
9ffe57a10e
commit
3f335ce3d4
287 changed files with 2829 additions and 2540 deletions
|
|
@ -133,7 +133,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati
|
|||
path = base_path.plus_file(p);
|
||||
}
|
||||
|
||||
Ref<Texture> texture = ResourceLoader::load(path);
|
||||
Ref<Texture2D> texture = ResourceLoader::load(path);
|
||||
|
||||
if (texture.is_valid()) {
|
||||
current->set_texture(SpatialMaterial::TEXTURE_ALBEDO, texture);
|
||||
|
|
@ -153,7 +153,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati
|
|||
path = base_path.plus_file(p);
|
||||
}
|
||||
|
||||
Ref<Texture> texture = ResourceLoader::load(path);
|
||||
Ref<Texture2D> texture = ResourceLoader::load(path);
|
||||
|
||||
if (texture.is_valid()) {
|
||||
current->set_texture(SpatialMaterial::TEXTURE_METALLIC, texture);
|
||||
|
|
@ -173,7 +173,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati
|
|||
path = base_path.plus_file(p);
|
||||
}
|
||||
|
||||
Ref<Texture> texture = ResourceLoader::load(path);
|
||||
Ref<Texture2D> texture = ResourceLoader::load(path);
|
||||
|
||||
if (texture.is_valid()) {
|
||||
current->set_texture(SpatialMaterial::TEXTURE_ROUGHNESS, texture);
|
||||
|
|
@ -187,7 +187,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati
|
|||
String p = l.replace("map_bump", "").replace("\\", "/").strip_edges();
|
||||
String path = base_path.plus_file(p);
|
||||
|
||||
Ref<Texture> texture = ResourceLoader::load(path);
|
||||
Ref<Texture2D> texture = ResourceLoader::load(path);
|
||||
|
||||
if (texture.is_valid()) {
|
||||
current->set_feature(SpatialMaterial::FEATURE_NORMAL_MAPPING, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue