Fix remove texture option
This commit is contained in:
parent
80993a19ea
commit
eca9313846
4 changed files with 6 additions and 100 deletions
|
@ -37,7 +37,7 @@ vec4 MakeLight(vec3 norm, vec3 position, vec3 diffuse, float radius, float sharp
|
||||||
Light light;
|
Light light;
|
||||||
light.position = position;
|
light.position = position;
|
||||||
light.diffuse = diffuse;
|
light.diffuse = diffuse;
|
||||||
light.radius = radius;
|
light.radius = radius;// * 2.0;
|
||||||
|
|
||||||
float alpha = kpc(distance(light.position, v_position), light.radius * sharpness, light.radius);
|
float alpha = kpc(distance(light.position, v_position), light.radius * sharpness, light.radius);
|
||||||
|
|
||||||
|
@ -71,13 +71,13 @@ void main()
|
||||||
//norm = vec3(0,1,0);
|
//norm = vec3(0,1,0);
|
||||||
vec4 texv = texture(u_texture, v_texcoord);
|
vec4 texv = texture(u_texture, v_texcoord);
|
||||||
|
|
||||||
vec4 ambient = vec4(0.1, 0.1, 0.1, 1.0) * 1.5, light = ambient;
|
vec4 ambient = vec4(0.1, 0.1, 0.1, 1.0) * 10.5, light = ambient;
|
||||||
|
|
||||||
light += MakeLight(norm, vec3(2.0, 10.0, -24.0), vec3(0.7), /*5.0*/ 1000.0, 1.0, 1.0);
|
light += MakeLight(norm, vec3(2.0, 10.0, -24.0), vec3(0.7), /*5.0*/ 1000.0, 1.0, 1.0);
|
||||||
light += MakeLight(norm, vec3(5.0, 2.0, -7.0 + cos(u_time/35.0) * 2.0), vec3(1.0, 0.6, 0.0), 5.0, 0.6, 1.0);
|
light += MakeLight(norm, vec3(5.0, 2.0, -7.0 + cos(u_time/35.0) * 2.0), vec3(1.0, 0.6, 0.0), 5.0, 0.6, 1.0);
|
||||||
light += MakeLight(norm, vec3(7, 2.0, -7.0 + -cos(u_time / 30.0) * 1.0), vec3(0.6, 0.9, 1.0), 5.0, 0.6, 1.0);
|
light += MakeLight(norm, vec3(7, 2.0, -7.0 + -cos(u_time / 30.0) * 1.0), vec3(0.6, 0.9, 1.0), 5.0, 0.6, 1.0);
|
||||||
|
|
||||||
v_output = texv * light;
|
v_output = texv * light;// * 2.0;
|
||||||
|
|
||||||
// + editor highlighting
|
// + editor highlighting
|
||||||
v_output.rgb *= u_highlight;
|
v_output.rgb *= u_highlight;
|
||||||
|
|
|
@ -1,95 +0,0 @@
|
||||||
[01:51:37 AM] Info: Starting...
|
|
||||||
|
|
||||||
KP3D version 2
|
|
||||||
===============================
|
|
||||||
Copyright (C) kpworld.xyz 2018-2024
|
|
||||||
Contact me! @kp_cftsz
|
|
||||||
|
|
||||||
[01:51:37 AM] Info: Initializing SDL
|
|
||||||
[01:51:37 AM] Info: Initializing OpenGL
|
|
||||||
[01:51:37 AM] Info: OpenGL version: 4.6.0 NVIDIA 536.23
|
|
||||||
[01:51:37 AM] Info: Initializing GLEW
|
|
||||||
[01:51:38 AM] Info: Initializing SDL_mixer
|
|
||||||
[01:51:38 AM] Info: Reticulating splines...
|
|
||||||
[01:51:38 AM] Info: Ready!
|
|
||||||
[01:51:38 AM] Info: Loading material resource: block.png
|
|
||||||
[01:51:38 AM] Info: Found normal map texture: materials/block_n.png
|
|
||||||
[01:51:38 AM] Info: Loading material resource: brick2.jpg
|
|
||||||
[01:51:38 AM] Info: Found normal map texture: materials/brick2_n.jpg
|
|
||||||
[01:51:38 AM] Info: Loading material resource: bricks.jpg
|
|
||||||
[01:51:38 AM] Info: Found normal map texture: materials/bricks_n.jpg
|
|
||||||
[01:51:38 AM] Info: Loading material resource: FLAT5_7.png
|
|
||||||
[01:51:38 AM] Info: Found normal map texture: materials/FLAT5_7_n.png
|
|
||||||
[01:51:38 AM] Info: Loading material resource: floor0.png
|
|
||||||
[01:51:38 AM] Info: Found normal map texture: materials/floor0_n.png
|
|
||||||
[01:51:38 AM] Info: Loading material resource: floor1.png
|
|
||||||
[01:51:38 AM] Info: Found normal map texture: materials/floor1_n.png
|
|
||||||
[01:51:38 AM] Info: Loading material resource: GRASS2.png
|
|
||||||
[01:51:38 AM] Info: Found normal map texture: materials/GRASS2_n.png
|
|
||||||
[01:51:38 AM] Info: Loading material resource: hardwood.jpg
|
|
||||||
[01:51:38 AM] Info: Found normal map texture: materials/hardwood_n.jpg
|
|
||||||
[01:51:38 AM] Info: Map init
|
|
||||||
[01:51:38 AM] Info: Finalized mesh with 49 batches
|
|
||||||
[01:51:58 AM] Info: Finalized mesh with 48 batches
|
|
||||||
[01:52:01 AM] Info: Finalized mesh with 48 batches
|
|
||||||
[01:52:12 AM] Info: Finalized mesh with 48 batches
|
|
||||||
[01:52:14 AM] Info: Finalized mesh with 48 batches
|
|
||||||
[01:52:15 AM] Info: Finalized mesh with 48 batches
|
|
||||||
[01:52:21 AM] Info: Finalized mesh with 48 batches
|
|
||||||
[01:52:24 AM] Info: Finalized mesh with 48 batches
|
|
||||||
[01:53:07 AM] Info: $ set-mode game
|
|
||||||
[01:53:07 AM] Info: $
|
|
||||||
[01:53:24 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:25 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:26 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:27 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:28 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:29 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:30 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:31 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:32 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:33 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:34 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(52) : error C7011: implicit cast from "float" to "vec3"
|
|
||||||
|
|
||||||
[01:53:35 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(53) : error C1503: undefined variable "ddiffuse"
|
|
||||||
|
|
||||||
[01:53:36 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(53) : error C1503: undefined variable "ddiffuse"
|
|
||||||
|
|
||||||
[01:53:37 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(53) : error C1503: undefined variable "ddiffuse"
|
|
||||||
|
|
||||||
[01:53:38 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(53) : error C1503: undefined variable "ddiffuse"
|
|
||||||
|
|
||||||
[01:58:13 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(50) : error C1503: undefined variable "ff"
|
|
||||||
|
|
||||||
[01:58:14 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(50) : error C1503: undefined variable "ff"
|
|
||||||
|
|
||||||
[01:58:15 AM] Warning: Failed to compile fragment shader:
|
|
||||||
0(50) : error C1503: undefined variable "ff"
|
|
||||||
|
|
|
@ -788,7 +788,7 @@ void Map::Update()
|
||||||
void Map::Render()
|
void Map::Render()
|
||||||
{
|
{
|
||||||
// Skybox
|
// Skybox
|
||||||
// RenderSkybox();
|
RenderSkybox();
|
||||||
|
|
||||||
// Map
|
// Map
|
||||||
glDisable(GL_CULL_FACE); // <- we shouldn't count on this
|
glDisable(GL_CULL_FACE); // <- we shouldn't count on this
|
||||||
|
|
|
@ -881,7 +881,8 @@ void Editor::RenderUIMaterialModal()
|
||||||
// Should we rebuild the map when we change stuff? I guess.
|
// Should we rebuild the map when we change stuff? I guess.
|
||||||
if (should_remove_texture)
|
if (should_remove_texture)
|
||||||
{
|
{
|
||||||
//*m_material_to_update = nullptr;
|
for (auto mats : m_materials_to_update)
|
||||||
|
*mats = nullptr;
|
||||||
m_materials_to_update.clear();
|
m_materials_to_update.clear();
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
should_show_material_modal = false;
|
should_show_material_modal = false;
|
||||||
|
|
Loading…
Reference in a new issue