Picking now returning world position
This commit is contained in:
@@ -46,10 +46,7 @@ public:
|
||||
float FarClip() const { return m_FarClip; }
|
||||
void SetFarClip(float val);
|
||||
|
||||
float m_AspectRatio;
|
||||
float m_FOV;
|
||||
float m_NearClip;
|
||||
float m_FarClip;
|
||||
|
||||
|
||||
private:
|
||||
void UpdateViewMatrix();
|
||||
@@ -60,6 +57,11 @@ private:
|
||||
|
||||
glm::mat4 m_ProjectionMatrix;
|
||||
glm::mat4 m_ViewMatrix;
|
||||
|
||||
float m_AspectRatio;
|
||||
float m_FOV;
|
||||
float m_NearClip;
|
||||
float m_FarClip;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -52,6 +52,11 @@ private:
|
||||
void DrawScreenQuad(GLuint textureToDraw);
|
||||
glm::vec3 GetClickedPixelData(float x, float y);
|
||||
void DrawScene(RenderQueueCollection& rq);
|
||||
|
||||
//--------------------Utility functions----------------//
|
||||
glm::vec3 ScreenCoordsToWorldPos(glm::vec2 screenCoord, float depth);
|
||||
//EntityID ScreenCoordsToEntityID(glm::vec2 screenCoord, float depth);
|
||||
|
||||
//--------------------ShaderPrograms-------------------//
|
||||
ShaderProgram m_BasicForwardProgram;
|
||||
ShaderProgram m_PickingProgram;
|
||||
|
||||
Reference in New Issue
Block a user