Browse Source

Remove material prefix from material shader inputs

master
C. J. Howard 3 years ago
parent
commit
099e2d0f1a
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/renderer/material.cpp
  2. +1
    -1
      src/renderer/material.hpp

+ 1
- 1
src/renderer/material.cpp View File

@ -115,7 +115,7 @@ std::size_t material::reconnect_properties()
if (program != nullptr) if (program != nullptr)
{ {
if (property->connect(program->get_input("material." + it->first)))
if (property->connect(program->get_input(it->first)))
{ {
--disconnected_property_count; --disconnected_property_count;
} }

+ 1
- 1
src/renderer/material.hpp View File

@ -150,7 +150,7 @@ material_property* material::add_property(const std::string& name, std::size_
// Attempt to connect property to its corresponding shader input // Attempt to connect property to its corresponding shader input
if (program) if (program)
{ {
property->connect(program->get_input("material." + name));
property->connect(program->get_input(name));
} }
return property; return property;

Loading…
Cancel
Save