PixelShader更名为FragementShader
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -82,7 +82,7 @@ typedef std::shared_ptr<const Renderable> RenderableConstPtr;
|
||||
typedef std::vector<RenderableConstPtr> RenderableArray;
|
||||
|
||||
class VertexShaderInterface;
|
||||
class PixelShaderInterface;
|
||||
class FragementShaderInterface;
|
||||
|
||||
class UniformBuffer;
|
||||
|
||||
|
||||
@@ -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)();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<int32_t, int32_t>& 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);
|
||||
|
||||
Reference in New Issue
Block a user