This commit is contained in:
Nick Fisher
2023-04-19 18:06:48 +08:00
parent 7f4ca7e69b
commit a162ff2400
30 changed files with 3604 additions and 2293 deletions

View File

@@ -4,6 +4,10 @@
#include <filament/Texture.h>
#include <filament/TextureSampler.h>
#include <math/mat4.h>
#include <math/vec3.h>
#include <math/vec4.h>
#include <math/mat3.h>
#include <math/norm.h>
namespace polyvox {
class FileMaterialProvider : public MaterialProvider {
@@ -36,9 +40,8 @@ namespace polyvox {
return hasTexture ? int(uvmap->at(srcIndex)) - 1 : -1;
};
Log("CREATING MATERIAL INSTANCE");
auto instance = _m->createInstance();
mat3f identity;
math::mat3f identity;
instance->setParameter("baseColorUvMatrix", identity);
instance->setParameter("normalUvMatrix", identity);

View File

@@ -1,5 +1,8 @@
#ifndef UNLIT_MATERIAL_PROVIDER
#define UNLIT_MATERIAL_PROVIDER
#include "material/unlit_opaque.h"
namespace polyvox {
class UnlitMaterialProvider : public MaterialProvider {