mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 16:19:19 +02:00
revert bad changes
This commit is contained in:
@@ -143,10 +143,11 @@ bool opengl_renderer::Init(GLFWwindow *Window)
|
||||
WriteLog("...gfx data pre-loading done");
|
||||
|
||||
// prepare basic geometry chunks
|
||||
float const size = 2.5f / 2.0f;
|
||||
auto const geometrybank = m_geometry.create_bank();
|
||||
m_billboardgeometry = m_geometry.create_chunk(
|
||||
gfx::vertex_array{
|
||||
{{-1.f, 1.f, 0.f}, glm::vec3(), {1.f, 1.f}}, {{1.f, 1.f, 0.f}, glm::vec3(), {0.f, 1.f}}, {{-1.f, -1.f, 0.f}, glm::vec3(), {1.f, 0.f}}, {{1.f, -1.f, 0.f}, glm::vec3(), {0.f, 0.f}}},
|
||||
{{-size, size, 0.f}, glm::vec3(), {1.f, 1.f}}, {{size, size, 0.f}, glm::vec3(), {0.f, 1.f}}, {{-size, -size, 0.f}, glm::vec3(), {1.f, 0.f}}, {{size, -size, 0.f}, glm::vec3(), {0.f, 0.f}}},
|
||||
geometrybank, GL_TRIANGLE_STRIP);
|
||||
m_empty_vao = std::make_unique<gl::vao>();
|
||||
|
||||
@@ -1250,7 +1251,7 @@ bool opengl_renderer::Render(world_environment *Environment)
|
||||
m_celestial_shader->bind();
|
||||
m_empty_vao->bind();
|
||||
|
||||
auto const &modelview = OpenGLMatrices.data( GL_MODELVIEW );
|
||||
auto const &modelview = OpenGLMatrices.data(GL_MODELVIEW);
|
||||
|
||||
// sun
|
||||
{
|
||||
@@ -3277,7 +3278,6 @@ void opengl_renderer::Render_Alpha(TSubModel *Submodel)
|
||||
m_billboard_shader->bind();
|
||||
Bind_Texture(0, m_glaretexture);
|
||||
model_ubs.param[0] = glm::vec4(glm::vec3(Submodel->f4Diffuse), Submodel->fVisible * glarelevel);
|
||||
model_ubs.param[1].x = 2.5f / 2.0f;
|
||||
|
||||
// main draw call
|
||||
draw(m_billboardgeometry);
|
||||
|
||||
@@ -7,6 +7,6 @@ out vec2 f_coord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = (projection * modelview) * vec4(v_vert * param[1].x, 1.0f);
|
||||
gl_Position = (projection * modelview) * vec4(v_vert, 1.0f);
|
||||
f_coord = v_coord;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user