Ignore:
Timestamp:
Aug 13, 2012, 2:25:42 PM (8 years ago)
Author:
sam
Message:

tutorial: nicer blur and colour effect in the FBO tutorial.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/08_fbo.cpp

    r1730 r1735  
    4848                                lol::sin(m_time * 4.4f) + lol::sin(m_time * 3.2f),
    4949                                lol::sin(m_time * 5.f));
    50         m_color = 0.25f * vec3(3.f + lol::sin(m_time * 4.5f + 1.f),
    51                                3.f + lol::sin(m_time * 2.8f + 1.3f),
    52                                3.f + lol::sin(m_time * 3.7f));
     50        m_color = 0.25f * vec3(1.1f + lol::sin(m_time * 1.5f + 1.f),
     51                               1.1f + lol::sin(m_time * 1.8f + 1.3f),
     52                               1.1f + lol::sin(m_time * 1.7f));
     53        /* Saturate dot color */
     54        float x = std::max(m_color.x, std::max(m_color.y, m_color.z));
     55        m_color /= x;
    5356    }
    5457
     
    6164            m_shader = Shader::Create(lolfx_08_fbo);
    6265            m_coord = m_shader->GetAttribLocation("in_Position", VertexUsage::Position, 0);
     66            m_uni_flag = m_shader->GetUniformLocation("in_Flag");
    6367            m_uni_point = m_shader->GetUniformLocation("in_Point");
    6468            m_uni_color = m_shader->GetUniformLocation("in_Color");
    65             m_uni_flag = m_shader->GetUniformLocation("in_Flag");
    6669            m_uni_texture = m_shader->GetUniformLocation("in_Texture");
    6770
Note: See TracChangeset for help on using the changeset viewer.