mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
work
This commit is contained in:
@@ -832,12 +832,12 @@ void opengl_texture::alloc_rendertarget(GLint format, GLint components, GLint ty
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
opengl_texture::set_filtering() const {
|
opengl_texture::set_filtering() const
|
||||||
|
{
|
||||||
// default texture mode
|
// default texture mode
|
||||||
::glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
::glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||||
::glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
|
::glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
|
||||||
::glTexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY, Global.AnisotropicFiltering );
|
::glTexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, Global.AnisotropicFiltering );
|
||||||
|
|
||||||
bool sharpen{ false };
|
bool sharpen{ false };
|
||||||
for( auto const &trait : traits ) {
|
for( auto const &trait : traits ) {
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ artifacts:
|
|||||||
name: binaries_x86
|
name: binaries_x86
|
||||||
- path: builds/eu07_x64_bin.zip
|
- path: builds/eu07_x64_bin.zip
|
||||||
name: binaries_x64
|
name: binaries_x64
|
||||||
|
- path: shaders
|
||||||
|
name: shaders
|
||||||
|
type: zip
|
||||||
- path: builds/eu07_x86_pdb.zip
|
- path: builds/eu07_x86_pdb.zip
|
||||||
name: symbols_x86
|
name: symbols_x86
|
||||||
- path: builds/eu07_x64_pdb.zip
|
- path: builds/eu07_x64_pdb.zip
|
||||||
|
|||||||
6
gl/ubo.h
6
gl/ubo.h
@@ -3,7 +3,7 @@
|
|||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "bindable.h"
|
#include "bindable.h"
|
||||||
|
|
||||||
#define UBS_PAD(x) uint64_t : x * 4; uint64_t : x * 4;
|
#define UBS_PAD(x) uint8_t PAD[x]
|
||||||
|
|
||||||
namespace gl
|
namespace gl
|
||||||
{
|
{
|
||||||
@@ -38,7 +38,7 @@ namespace gl
|
|||||||
glm::mat4 projection;
|
glm::mat4 projection;
|
||||||
glm::mat4 lightview;
|
glm::mat4 lightview;
|
||||||
float time;
|
float time;
|
||||||
UBS_PAD(12)
|
UBS_PAD(12);
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(scene_ubs) == 144, "bad size of ubs");
|
static_assert(sizeof(scene_ubs) == 144, "bad size of ubs");
|
||||||
@@ -54,7 +54,7 @@ namespace gl
|
|||||||
glm::vec3 velocity;
|
glm::vec3 velocity;
|
||||||
float opacity;
|
float opacity;
|
||||||
float emission;
|
float emission;
|
||||||
UBS_PAD(12)
|
UBS_PAD(12);
|
||||||
|
|
||||||
void set_modelview(const glm::mat4 &mv)
|
void set_modelview(const glm::mat4 &mv)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ void main()
|
|||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vec3 envcolor = texture(envmap, reflect(f_pos, normalize(f_normal))).rgb;
|
||||||
|
|
||||||
float shadow = calc_shadow();
|
float shadow = calc_shadow();
|
||||||
vec3 result = ambient * 0.3 + vec3(1.0) * emission;
|
vec3 result = ambient * 0.3 + vec3(1.0) * emission;
|
||||||
for (uint i = 0U; i < lights_count; i++)
|
for (uint i = 0U; i < lights_count; i++)
|
||||||
@@ -119,7 +121,7 @@ void main()
|
|||||||
|
|
||||||
if (i == 0U)
|
if (i == 0U)
|
||||||
part *= shadow;
|
part *= shadow;
|
||||||
result += light.color * part;
|
result += light.color * part * envcolor;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec3 c = apply_fog(result * tex_color.xyz);
|
vec3 c = apply_fog(result * tex_color.xyz);
|
||||||
|
|||||||
Reference in New Issue
Block a user