-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use texture switch #440
Use texture switch #440
Conversation
Heres a bug: ImGuiUtils::ImGuiBoolProperty("Use texture", pPropertyGroup->useTexture);
if (pPropertyGroup->useTexture)
{
pMaterialComponent->ActivateShaderFeature(engine::MaterialTextureTypeToShaderFeature.at(textureType));
}
else
{
pMaterialComponent->DeactivateShaderFeature(engine::MaterialTextureTypeToShaderFeature.at(textureType));
} Due to the different granularity of the useTexture of ORM PropertyGroup and the ShaderFeature of ORM, it is difficult to control the switching of the ORM ShaderFeature with the useTexture checkbox on UI. |
ORM is a project logic which will be removed in the editor/engine finally. The correct way is to write a MaterialGraph. Then PBR material node exports Occulsion, Roughness, Metalness float values to user. User can choose Texture node's R/G/B/A to output to the input of PBR material node. Reference to Maya/Blender/Unreal's material graph design is OK. And logics about BaseColor/Normal/... will also be removed in the future. A good design is to transfer these settings to a material type metadata file. Editor/Engine codes only care about very generic settings : parameters(CBuffer), resources(2d/3d/procedural/... textures), samplers(how to use texture), render states(blend/alpha/...) |
Properties that do not use textures display "No Resources".
Also removes the warning about no textures in ECWorldConsumer::AddMaterial.