소스 검색

build: fix all vector/scalar type mismatches such as "vec2 * double"

instead of "vec2 * float".
master
Sam Hocevar 11 년 전
부모
커밋
34d5feaac8
3개의 변경된 파일18개의 추가작업 그리고 17개의 파일을 삭제
  1. +14
    -14
      neercs/video/render.cpp
  2. +2
    -2
      neercs/video/text-render.cpp
  3. +2
    -1
      neercs/video/text-render.h

+ 14
- 14
neercs/video/render.cpp 파일 보기

@@ -1546,7 +1546,7 @@ void Render::Draw3D()
fbo_blur_h->Bind();
shader_blur_h->Bind();
shader_blur_h->SetUniform(shader_blur_h_texture, fbo_back->GetTexture(), 0);
shader_blur_h->SetUniform(shader_blur_h_radius, glow_large / screen_size.x);
shader_blur_h->SetUniform(shader_blur_h_radius, glow_large / (float)screen_size.x);
TraceQuad();
shader_blur_h->Unbind();
fbo_blur_h->Unbind();
@@ -1554,7 +1554,7 @@ void Render::Draw3D()
fbo_blur_v->Bind();
shader_blur_v->Bind();
shader_blur_v->SetUniform(shader_blur_v_texture, fbo_blur_h->GetTexture(), 0);
shader_blur_v->SetUniform(shader_blur_v_radius, glow_large / screen_size.y);
shader_blur_v->SetUniform(shader_blur_v_radius, glow_large / (float)screen_size.y);
TraceQuad();
shader_blur_v->Unbind();
fbo_blur_v->Unbind();
@@ -1562,7 +1562,7 @@ void Render::Draw3D()
fbo_blur_h->Bind();
shader_blur_h->Bind();
shader_blur_h->SetUniform(shader_blur_h_texture, fbo_blur_v->GetTexture(), 0);
shader_blur_h->SetUniform(shader_blur_h_radius, glow_small / screen_size.x);
shader_blur_h->SetUniform(shader_blur_h_radius, glow_small / (float)screen_size.x);
TraceQuad();
shader_blur_h->Unbind();
fbo_blur_h->Unbind();
@@ -1570,7 +1570,7 @@ void Render::Draw3D()
fbo_blur_v->Bind();
shader_blur_v->Bind();
shader_blur_v->SetUniform(shader_blur_v_texture, fbo_blur_h->GetTexture(), 0);
shader_blur_v->SetUniform(shader_blur_v_radius, glow_small / screen_size.y);
shader_blur_v->SetUniform(shader_blur_v_radius, glow_small / (float)screen_size.y);
TraceQuad();
shader_blur_v->Unbind();
fbo_blur_v->Unbind();
@@ -1637,7 +1637,7 @@ void Render::Draw3D()
fbo_tmp->Bind();
shader_blur_h->Bind();
shader_blur_h->SetUniform(shader_blur_h_texture, fbo_screen->GetTexture(), 0);
shader_blur_h->SetUniform(shader_blur_h_radius, blur / screen_size.x);
shader_blur_h->SetUniform(shader_blur_h_radius, blur / (float)screen_size.x);
TraceQuad();
shader_blur_h->Unbind();
fbo_tmp->Unbind();
@@ -1645,7 +1645,7 @@ void Render::Draw3D()
fbo_screen->Bind();
shader_blur_v->Bind();
shader_blur_v->SetUniform(shader_blur_v_texture, fbo_tmp->GetTexture(), 0);
shader_blur_v->SetUniform(shader_blur_v_radius, blur / screen_size.y);
shader_blur_v->SetUniform(shader_blur_v_radius, blur / (float)screen_size.y);
TraceQuad();
shader_blur_v->Unbind();
fbo_screen->Unbind();
@@ -1658,20 +1658,20 @@ void Render::Draw3D()
shader_postfx->Bind();
shader_postfx->SetUniform(shader_postfx_texture, fbo_screen->GetTexture(), 0);
shader_postfx->SetUniform(shader_postfx_screen_size, (vec2)screen_size);
shader_postfx->SetUniform(shader_postfx_ratio_2d, (vec2)ratio_2d / 2);
shader_postfx->SetUniform(shader_postfx_ratio_2d, (vec2)ratio_2d * 0.5f);
shader_postfx->SetUniform(shader_postfx_time, fx_angle);
shader_postfx->SetUniform(shader_postfx_deform, postfx_deform);
shader_postfx->SetUniform(shader_postfx_ghost1, vec4(postfx_ghost1.xyz * 0.01, postfx_ghost1.w));
shader_postfx->SetUniform(shader_postfx_ghost2, vec4(postfx_ghost2.xyz * 0.01, postfx_ghost2.w));
shader_postfx->SetUniform(shader_postfx_glass, vec4(postfx_glass.xy * 0.01, postfx_glass.z * 0.1, postfx_glass.w));
shader_postfx->SetUniform(shader_postfx_ghost1, vec4(postfx_ghost1.xyz * 0.01f, postfx_ghost1.w));
shader_postfx->SetUniform(shader_postfx_ghost2, vec4(postfx_ghost2.xyz * 0.01f, postfx_ghost2.w));
shader_postfx->SetUniform(shader_postfx_glass, vec4(postfx_glass.xy * 0.01f, postfx_glass.z * 0.1f, postfx_glass.w));
shader_postfx->SetUniform(shader_postfx_gradient, postfx_gradient);
shader_postfx->SetUniform(shader_postfx_gradient_color, postfx_gradient_color);
shader_postfx->SetUniform(shader_postfx_vignetting, postfx_vignetting);
shader_postfx->SetUniform(shader_postfx_aberration, postfx_aberration);
shader_postfx->SetUniform(shader_postfx_moire_h, vec4(postfx_moire_h.xyz, postfx_moire_h.w * 2 * M_PI));
shader_postfx->SetUniform(shader_postfx_moire_v, vec4(postfx_moire_v.xyz, postfx_moire_v.w * 2 * M_PI));
shader_postfx->SetUniform(shader_postfx_scanline_h, vec4(postfx_scanline_h.xyz, postfx_scanline_h.w * 2 * M_PI));
shader_postfx->SetUniform(shader_postfx_scanline_v, vec4(postfx_scanline_v.xyz, postfx_scanline_v.w * 2 * M_PI));
shader_postfx->SetUniform(shader_postfx_moire_h, vec4(postfx_moire_h.xyz, postfx_moire_h.w * (float)(2 * M_PI)));
shader_postfx->SetUniform(shader_postfx_moire_v, vec4(postfx_moire_v.xyz, postfx_moire_v.w * (float)(2 * M_PI)));
shader_postfx->SetUniform(shader_postfx_scanline_h, vec4(postfx_scanline_h.xyz, postfx_scanline_h.w * (float)(2 * M_PI)));
shader_postfx->SetUniform(shader_postfx_scanline_v, vec4(postfx_scanline_v.xyz, postfx_scanline_v.w * (float)(2 * M_PI)));
shader_postfx->SetUniform(shader_postfx_corner, postfx_corner);
shader_postfx->SetUniform(shader_postfx_sync, (float)fabs(sync_value * cosf((main_angle - sync_angle) * 6.0f)));
shader_postfx->SetUniform(shader_postfx_beat, (float)fabs(beat_value * cosf((main_angle - beat_angle) * 6.0f)));


+ 2
- 2
neercs/video/text-render.cpp 파일 보기

@@ -115,8 +115,8 @@ void TextRender::Render()
* - translate to the lower left corner */
mat4 xform = mat4::translate(-1.f, -1.f + 2.0f * m_font_size.y
* m_canvas_size.y / m_fbo_size.y, 0.f)
* mat4::scale(vec3(2.f * m_font_size / m_fbo_size, 1.f)
* vec3(1.f, -1.f, 1.f))
* mat4::scale(vec3((vec2)m_font_size / (vec2)m_fbo_size, 1.f)
* vec3(2.f, -2.f, 1.f))
* mat4::translate(0.5f, 0.5f, 0.f);

/* Upload libcaca canvas contents to the vertex buffers */


+ 2
- 1
neercs/video/text-render.h 파일 보기

@@ -5,8 +5,9 @@
#if !defined __TEXT_RENDER_H__
#define __TEXT_RENDER_H__

struct TextRender
class TextRender
{
public:
TextRender(caca_canvas_t *caca, ivec2 font_size);
void Init();
void Render();


불러오는 중...
취소
저장