added high quality potator projectiles
This commit is contained in:
parent
d25dffa8d4
commit
9bf9885e86
3
deploy/data/leather-normal.jpg
Normal file
3
deploy/data/leather-normal.jpg
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c2744d10d39572868f161f77fee1e6c6114348b31bd735d0535119d956df330e
|
||||
size 442368
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fdfb67810a152660d7ddaa702e1bf8ead86cefe3f44cef45f97b34f2f8d8e00b
|
||||
size 9673
|
||||
oid sha256:5d2bc01b2b7aaf394acb0ec5338516465e1c9e2780cd8452330f5d287c6a271e
|
||||
size 90112
|
||||
|
3
deploy/data/slipperystonework_albedo.png
Normal file
3
deploy/data/slipperystonework_albedo.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:162ceea8b3cc087aa4bcb25db70a88b433649e6e8a7f491ba50cc2581585bf47
|
||||
size 7314341
|
3
deploy/data/slipperystonework_metallic.png
Normal file
3
deploy/data/slipperystonework_metallic.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:16ab4394f49880fe64b2a6405592a0325367f184d4829d8219612aef91c05f18
|
||||
size 15009
|
3
deploy/data/slipperystonework_normal.png
Normal file
3
deploy/data/slipperystonework_normal.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce7fa8504ccc7ef77e9dcb16bd1e1043797de43783dfbe472bf52ffb6e65da56
|
||||
size 7533234
|
3
deploy/data/slipperystonework_roughness.png
Normal file
3
deploy/data/slipperystonework_roughness.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3c3f730b52ba57e9b5f64490b27a702b38222d043264d3e414722dbe5bac6bd1
|
||||
size 4799103
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:40ba8f1ef59a9cfda99149b0aca367e9211f130da99a9fdfc547cedfa1a4bcb4
|
||||
size 6474
|
3
deploy/data/streakedmetal_albedo.png
Normal file
3
deploy/data/streakedmetal_albedo.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4c21a445fb923a8c0afe279135470f1da0290dd43b4f0ebcdcad458374fcb536
|
||||
size 1335112
|
3
deploy/data/streakedmetal_metallic.png
Normal file
3
deploy/data/streakedmetal_metallic.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:07f3c88595d842cf1cd40d4c9bebb4e82e97ae850d9a80500d4fd56a785e902b
|
||||
size 19626
|
3
deploy/data/streakedmetal_roughness.png
Normal file
3
deploy/data/streakedmetal_roughness.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5c7f0e3e6fc1725c71257cf4192792ef03c79d98cf0fa515189dadb04bb785cd
|
||||
size 2982336
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:21173927cb0e81a2acbc0e4e8382293c08d8e633f47caa3ce76f870b56b6d561
|
||||
size 129
|
||||
oid sha256:076919d060d12a120970903fea60f4ee9979602fd7eb705b1e9d4bc78024a583
|
||||
size 227
|
||||
|
3
deploy/data/woodframe_albedo.png
Normal file
3
deploy/data/woodframe_albedo.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6bad25466e6184902ee2c2ec7d47f8ae112943d3c92fca387a5b41da0b42a2a5
|
||||
size 6976127
|
3
deploy/data/woodframe_metallic.png
Normal file
3
deploy/data/woodframe_metallic.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:289e65cf6fa41d6c00a62cde57ffb20dbe5f1de6b3e6a3ef4d8a7de8f41524bd
|
||||
size 15007
|
3
deploy/data/woodframe_normal.png
Normal file
3
deploy/data/woodframe_normal.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:25c6e56846639f176e8d9ef756b5df8329cba6cd0117812dc79dfa2892ccf560
|
||||
size 6869334
|
3
deploy/data/woodframe_roughness.png
Normal file
3
deploy/data/woodframe_roughness.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f714f443197a22e6f7148004b344f0081f9c7667b85429472d38b9190af43d79
|
||||
size 1822076
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include <SparrowRenderer/mesh.h>
|
||||
#include <SparrowRenderer/pbrmaterial.h>
|
||||
#include <SparrowRenderer/deferredpipeline.h>
|
||||
|
||||
#include <glm/ext.hpp>
|
||||
|
||||
@ -48,7 +49,7 @@ void GuiTools::materialGui()
|
||||
options += "None\n";
|
||||
meshes.push_back(nullptr);
|
||||
int i = 1;
|
||||
for(SceneIterator<GeometryNode*>* geometryIt = getEngine().getScene()->getGeometry(); geometryIt->isValid(); geometryIt->next())
|
||||
for(SceneIterator<GeometryNode*>* geometryIt = m_scene->getGeometry(); geometryIt->isValid(); geometryIt->next())
|
||||
{
|
||||
options += geometryIt->getItem()->mesh->getName();
|
||||
options += '\n';
|
||||
@ -91,3 +92,9 @@ void GuiTools::toggleMaterialEditor()
|
||||
{
|
||||
m_materialEditorEnabled = !m_materialEditorEnabled;
|
||||
}
|
||||
|
||||
void GuiTools::toggleRenderingPipelineGui()
|
||||
{
|
||||
DeferredPipeline* pipeline = dynamic_cast<DeferredPipeline*>(m_scene->getPipeline());
|
||||
pipeline->toggleDebugGui();
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ public:
|
||||
void materialGui();
|
||||
void togglePicker();
|
||||
void toggleMaterialEditor();
|
||||
void toggleRenderingPipelineGui();
|
||||
};
|
||||
|
||||
#endif // GUITOOLS_H
|
||||
|
@ -21,6 +21,7 @@ ScriptNode::ScriptNode()
|
||||
LUA_SET_FUN(clear);
|
||||
LUA_SET_FUN(picker);
|
||||
LUA_SET_FUN(materialEditor);
|
||||
LUA_SET_FUN(rendering);
|
||||
}
|
||||
|
||||
void ScriptNode::update(){
|
||||
@ -92,3 +93,7 @@ void ScriptNode::picker(){
|
||||
void ScriptNode::materialEditor(){
|
||||
this->getEngine().getGuiTools()->toggleMaterialEditor();
|
||||
}
|
||||
|
||||
void ScriptNode::rendering(){
|
||||
this->getEngine().getGuiTools()->toggleRenderingPipelineGui();
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
void testfunc(int, float,float,float);
|
||||
void picker();
|
||||
void materialEditor();
|
||||
|
||||
void rendering();
|
||||
};
|
||||
|
||||
#endif // SCRIPTNODE_H
|
||||
|
@ -90,6 +90,8 @@ void generateTerrain(SceneTree *scene, btDiscreteDynamicsWorld *world)
|
||||
TestGen gen;
|
||||
PBRMaterial *mat = new PBRMaterial();
|
||||
mat->albedo = glm::vec3(0.1f, 0.4f, 0.2f);
|
||||
mat->metallic = 0.2f;
|
||||
mat->roughness = 0.95f;
|
||||
|
||||
for(int x=-3; x<3; ++x)
|
||||
for(int y=-2; y<2; ++y)
|
||||
|
@ -66,14 +66,18 @@ Potator::Potator(PlayerCharacterNode * player,
|
||||
m_cubeMesh->addTriangle(id+7, id+5, id+6);
|
||||
}
|
||||
|
||||
Image* wood = Loader::loadImage("woodbox.jpg", 24);
|
||||
PBRMaterial *mat = new PBRMaterial();
|
||||
mat->setTexture(PBRMaterial::ALBEDO_SLOT, new Texture(wood), "wood_texture");
|
||||
mat->roughness = 0.95f;
|
||||
mat->metallic = 0.01f;
|
||||
Image* img = Loader::loadImage("woodframe_albedo.png", 24);
|
||||
mat->setTexture(PBRMaterial::ALBEDO_SLOT, new Texture(img));
|
||||
img = Loader::loadImage("woodframe_metallic.png", 8);
|
||||
mat->setTexture(PBRMaterial::METALLIC_SLOT, new Texture(img));
|
||||
img = Loader::loadImage("woodframe_roughness.png", 8);
|
||||
mat->setTexture(PBRMaterial::ROUGHNESS_SLOT, new Texture(img));
|
||||
img = Loader::loadImage("woodframe_normal.png", 24);
|
||||
mat->setTexture(PBRMaterial::NORMALS_SLOT, new Texture(img));
|
||||
|
||||
m_cubeMesh->setMaterial(mat);
|
||||
|
||||
m_cubeMesh->computeTangents();
|
||||
m_cubeMesh->initGL();
|
||||
|
||||
btVector3 halfExtents(s.x+PHYSICS_OFFSET, s.y+PHYSICS_OFFSET, s.z+PHYSICS_OFFSET);
|
||||
@ -83,13 +87,19 @@ Potator::Potator(PlayerCharacterNode * player,
|
||||
|
||||
// creating sphere
|
||||
mat = new PBRMaterial();
|
||||
mat->albedo = glm::vec3(0.1f, 0.1f, 0.2f);
|
||||
mat->roughness = 0.01f;
|
||||
mat->metallic = 0.95f;
|
||||
img = Loader::loadImage("slipperystonework_albedo.png", 24);
|
||||
mat->setTexture(PBRMaterial::ALBEDO_SLOT, new Texture(img));
|
||||
img = Loader::loadImage("slipperystonework_metallic.png", 8);
|
||||
mat->setTexture(PBRMaterial::METALLIC_SLOT, new Texture(img));
|
||||
img = Loader::loadImage("slipperystonework_roughness.png", 8);
|
||||
mat->setTexture(PBRMaterial::ROUGHNESS_SLOT, new Texture(img));
|
||||
img = Loader::loadImage("slipperystonework_normal.png", 24);
|
||||
mat->setTexture(PBRMaterial::NORMALS_SLOT, new Texture(img));
|
||||
|
||||
SphereGenerator sphereGen;
|
||||
m_sphereMesh = sphereGen.generateGeodesicMesh(mat, 2, sphereRadius);
|
||||
m_sphereMesh = sphereGen.generateParametricMesh(mat, 20, 20, sphereRadius);
|
||||
m_sphereMesh->computeNormals();
|
||||
m_sphereMesh->computeTangents();
|
||||
m_sphereMesh->mergeVertices();
|
||||
m_sphereMesh->initGL();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user