diff --git a/source/core/include/asset/dvc_material.h b/source/core/include/asset/dvc_material.h index 8cd5b2b..02b332a 100644 --- a/source/core/include/asset/dvc_material.h +++ b/source/core/include/asset/dvc_material.h @@ -79,8 +79,8 @@ public: return m_vertexShader; } - PixelShaderInterface* getPixelShader() const { - return m_pixelShader; + FragementShaderInterface* getFragementShader() const { + return m_fragementShader; } virtual bool setupMaterial(); @@ -104,7 +104,7 @@ protected: std::string m_name; VertexShaderInterface* m_vertexShader = nullptr; - PixelShaderInterface* m_pixelShader = nullptr; + FragementShaderInterface* m_fragementShader = nullptr; std::string m_vertexshaderFile; std::string m_vertexShaderName; diff --git a/source/core/include/dvc_pre_declare.h b/source/core/include/dvc_pre_declare.h index 2c22c78..88a7597 100644 --- a/source/core/include/dvc_pre_declare.h +++ b/source/core/include/dvc_pre_declare.h @@ -82,7 +82,7 @@ typedef std::shared_ptr RenderableConstPtr; typedef std::vector RenderableArray; class VertexShaderInterface; -class PixelShaderInterface; +class FragementShaderInterface; class UniformBuffer; diff --git a/source/core/include/shader/dvc_shader_interface.h b/source/core/include/shader/dvc_shader_interface.h index cc31c07..74ac05a 100644 --- a/source/core/include/shader/dvc_shader_interface.h +++ b/source/core/include/shader/dvc_shader_interface.h @@ -23,7 +23,7 @@ public: virtual void end() = 0; }; -class PixelShaderInterface +class FragementShaderInterface { public: virtual const char* getName(void) const = 0; @@ -39,7 +39,7 @@ class ShaderFileInterface { public: virtual VertexShaderInterface* getVertexShader(const char* szName) = 0; - virtual PixelShaderInterface* getPixelShader(const char* szName) = 0; + virtual FragementShaderInterface* getFragementShader(const char* szName) = 0; }; typedef ShaderFileInterface* (*ShaderFileInterfaceFunc)(); diff --git a/source/core/source/asset/dvc_material.cpp b/source/core/source/asset/dvc_material.cpp index 14353f8..93ed1e3 100644 --- a/source/core/source/asset/dvc_material.cpp +++ b/source/core/source/asset/dvc_material.cpp @@ -44,8 +44,8 @@ bool Material::setupMaterial() return false; } - m_pixelShader = shaderInterface->getPixelShader(m_fragementShaderName.c_str()); - if (!m_pixelShader) + m_fragementShader = shaderInterface->getFragementShader(m_fragementShaderName.c_str()); + if (!m_fragementShader) { return false; } diff --git a/source/core/source/pipe/dvc_render_step2_rasterizer.cpp b/source/core/source/pipe/dvc_render_step2_rasterizer.cpp index b93bbb6..1812255 100644 --- a/source/core/source/pipe/dvc_render_step2_rasterizer.cpp +++ b/source/core/source/pipe/dvc_render_step2_rasterizer.cpp @@ -30,8 +30,8 @@ void RasterizerStep::process(RenderPipe& pipe, const VertexShaderStep::NodeArray { debugMaterial->pickupParam(node.material); } - PixelShaderInterface* pixelShader = debugMaterial ? debugMaterial->getPixelShader() : node.material->getPixelShader(); - pixelShader->begin(&pipe, debugMaterial ?debugMaterial : node.material); + FragementShaderInterface* fragementShader = debugMaterial ? debugMaterial->getFragementShader() : node.material->getFragementShader(); + fragementShader->begin(&pipe, debugMaterial ?debugMaterial : node.material); size_t vertexSize = node.vertexDesc.vertexByteSize(); size_t POS_offset = node.vertexDesc.getElement(VET_POSITION_NDC)->offset; @@ -51,7 +51,7 @@ void RasterizerStep::process(RenderPipe& pipe, const VertexShaderStep::NodeArray Rasterizer::drawTriangleLarrabee(aaTech, canvasWidth, canvasHeight, pos0.xy(), pos1.xy(), pos2.xy(), - [this, canvasWidth, pixelShader, vertex0, vertex1, vertex2, invZ, vertexDepth, &node] + [this, canvasWidth, fragementShader, vertex0, vertex1, vertex2, invZ, vertexDepth, &node] (const std::pair& dot, const fVector3& percent, uint32_t mask) { fVector3 percentCorrected(percent); @@ -74,7 +74,7 @@ void RasterizerStep::process(RenderPipe& pipe, const VertexShaderStep::NodeArray // int a = 0; //} fVector4 color; - pixelShader->process(node.vertexDesc, &(pixelData[0]), color); + fragementShader->process(node.vertexDesc, &(pixelData[0]), color); float32_t depth = MathUtil::lerp3(vertexDepth[0], vertexDepth[1], vertexDepth[2], percentCorrected); diff --git a/source/shaders/standard/dll_main.cpp b/source/shaders/standard/dll_main.cpp index cf5ef0c..d48660c 100644 --- a/source/shaders/standard/dll_main.cpp +++ b/source/shaders/standard/dll_main.cpp @@ -12,14 +12,14 @@ class StandardShaderInterface : public davinci::ShaderFileInterface { public: - virtual davinci::VertexShaderInterface* getVertexShader(const char* szName) + virtual davinci::VertexShaderInterface* getVertexShader(const char* szName) override { auto it = m_vertexShaderMap.find(szName); if (it != m_vertexShaderMap.end()) return it->second; return nullptr; } - virtual davinci::PixelShaderInterface* getPixelShader(const char* szName) + virtual davinci::FragementShaderInterface* getFragementShader(const char* szName) override { auto it = m_fragementShaderMap.find(szName); if (it != m_fragementShaderMap.end()) return it->second; @@ -66,14 +66,14 @@ private: { m_vertexShaderMap.insert(std::make_pair(vertexShader->getName(), vertexShader)); } - void registerFragementShader(davinci::PixelShaderInterface* fragementShader) + void registerFragementShader(davinci::FragementShaderInterface* fragementShader) { m_fragementShaderMap.insert(std::make_pair(fragementShader->getName(), fragementShader)); } private: std::map m_vertexShaderMap; - std::map m_fragementShaderMap; + std::map m_fragementShaderMap; }; extern "C" diff --git a/source/shaders/standard/fs_classic_phong.h b/source/shaders/standard/fs_classic_phong.h index 4633054..3a21eff 100644 --- a/source/shaders/standard/fs_classic_phong.h +++ b/source/shaders/standard/fs_classic_phong.h @@ -3,7 +3,7 @@ #include "dvc_config.h" #include "shader/dvc_shader_interface.h" -class ClassicFragementShader_Phong : public davinci::PixelShaderInterface +class ClassicFragementShader_Phong : public davinci::FragementShaderInterface { public: virtual const char* getName(void) const; diff --git a/source/shaders/standard/fs_debug_geometry_normal.h b/source/shaders/standard/fs_debug_geometry_normal.h index c1daea4..93f14ae 100644 --- a/source/shaders/standard/fs_debug_geometry_normal.h +++ b/source/shaders/standard/fs_debug_geometry_normal.h @@ -3,7 +3,7 @@ #include "dvc_config.h" #include "shader/dvc_shader_interface.h" -class DebugFragementShader_GeometryNormal : public davinci::PixelShaderInterface +class DebugFragementShader_GeometryNormal : public davinci::FragementShaderInterface { public: virtual const char* getName(void) const; diff --git a/source/shaders/standard/fs_debug_show_texture.h b/source/shaders/standard/fs_debug_show_texture.h index 3d40d8d..6547de5 100644 --- a/source/shaders/standard/fs_debug_show_texture.h +++ b/source/shaders/standard/fs_debug_show_texture.h @@ -4,7 +4,7 @@ #include "shader/dvc_shader_interface.h" #include "asset/dvc_material.h" -class DebugFragementShader_ShowTexture : public davinci::PixelShaderInterface +class DebugFragementShader_ShowTexture : public davinci::FragementShaderInterface { public: virtual const char* getName(void) const; diff --git a/source/shaders/standard/fs_debug_solid_color.h b/source/shaders/standard/fs_debug_solid_color.h index 18c00cd..aa7ceff 100644 --- a/source/shaders/standard/fs_debug_solid_color.h +++ b/source/shaders/standard/fs_debug_solid_color.h @@ -3,7 +3,7 @@ #include "dvc_config.h" #include "shader/dvc_shader_interface.h" -class DebugFragementShader_SolidColor : public davinci::PixelShaderInterface +class DebugFragementShader_SolidColor : public davinci::FragementShaderInterface { public: virtual const char* getName(void) const; diff --git a/source/shaders/standard/fs_debug_texture_coordinates.h b/source/shaders/standard/fs_debug_texture_coordinates.h index 0089471..68bea3b 100644 --- a/source/shaders/standard/fs_debug_texture_coordinates.h +++ b/source/shaders/standard/fs_debug_texture_coordinates.h @@ -3,7 +3,7 @@ #include "dvc_config.h" #include "shader/dvc_shader_interface.h" -class DebugFragementShader_TextureCoordinates : public davinci::PixelShaderInterface +class DebugFragementShader_TextureCoordinates : public davinci::FragementShaderInterface { public: virtual const char* getName(void) const; diff --git a/source/shaders/standard/fs_pbr_gltf.h b/source/shaders/standard/fs_pbr_gltf.h index 5436447..7fa9b49 100644 --- a/source/shaders/standard/fs_pbr_gltf.h +++ b/source/shaders/standard/fs_pbr_gltf.h @@ -3,7 +3,7 @@ #include "dvc_config.h" #include "shader/dvc_shader_interface.h" -class PbrFragementShader_GLTF : public davinci::PixelShaderInterface +class PbrFragementShader_GLTF : public davinci::FragementShaderInterface { public: virtual const char* getName(void) const;