Built assets.

This commit is contained in:
Branimir Karadžić
2017-10-03 20:29:40 -07:00
parent 78c4539646
commit 016fd301b0
48 changed files with 22 additions and 9 deletions

View File

@@ -25,14 +25,14 @@ float nrand(in vec2 n)
float n4rand_ss(in vec2 n)
{
float nrnd0 = nrand( n + 0.07*fract( u_parameters.w ) );
float nrnd1 = nrand( n + 0.11*fract( u_parameters.w + 0.573953 ) );
float nrnd1 = nrand( n + 0.11*fract( u_parameters.w + 0.573953 ) );
return 0.23*sqrt(-log(nrnd0+0.00001))*cos(2.0*3.141592*nrnd1)+0.5;
}
void main()
{
float size2 = u_parameters.x * u_parameters.x;
vec3 lightDir = normalize(u_sunDirection.xyz);
float distance = 2.0 * (1.0 - dot(normalize(v_viewDir), lightDir));
float sun = exp(-distance/ u_parameters.y / size2) + step(distance, size2);
@@ -41,6 +41,6 @@ void main()
color = toGamma(color);
float r = n4rand_ss(v_screenPos);
color += vec3(r, r, r) / 40.0;
gl_FragColor = vec4(color, 1.0);
}

10
examples/36-sky/makefile Normal file
View File

@@ -0,0 +1,10 @@
#
# Copyright 2011-2017 Branimir Karadzic. All rights reserved.
# License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
#
BGFX_DIR=../..
RUNTIME_DIR=$(BGFX_DIR)/examples/runtime
BUILD_DIR=../../.build
include $(BGFX_DIR)/scripts/shader.mk

View File

@@ -1,7 +1,7 @@
/*
* Copyright 2017 Stanislav Pidhorskyi. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
* Copyright 2017 Stanislav Pidhorskyi. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
/*
* This example demonstrates:
@@ -227,7 +227,7 @@ namespace
class SunController
{
public:
enum Month :int
enum Month : int
{
January = 0,
February,
@@ -333,7 +333,7 @@ namespace
ProceduralSky::ScreenPosVertex::init();
m_skyProgram = loadProgram("vs_sky", "fs_sky");
m_skyProgram_colorBandingFix = loadProgram("vs_sky", "fs_sky_ColorBandingFix");
m_skyProgram_colorBandingFix = loadProgram("vs_sky", "fs_sky_color_banding_fix");
m_preventBanding = true;
@@ -529,7 +529,6 @@ namespace
ImGui::End();
}
bool update() override
{
if (!entry::processEvents(m_width, m_height, m_debug, m_reset, &m_mouseState))

View File

@@ -15,3 +15,4 @@ build $meshes/tree1b_lod1_1.bin: geometryc_pack_normal $pwd/tree1b
build $meshes/tree1b_lod1_2.bin: geometryc_pack_normal $pwd/tree1b_lod1_2.obj
build $meshes/tree1b_lod2_1.bin: geometryc_pack_normal $pwd/tree1b_lod2_1.obj
build $meshes/tree1b_lod2_2.bin: geometryc_pack_normal $pwd/tree1b_lod2_2.obj
build $meshes/test_scene.bin: geometryc_pack_normal $pwd/../sky/test_scene.obj

View File

@@ -9,3 +9,4 @@ build $textures/texture_compression_etc2.ktx: texturec_etc2 $pwd/texture_compres
build $textures/parallax-d.ktx: texturec_diffuse $pwd/parallax-d.png
build $textures/parallax-n.ktx: texturec_normal $pwd/parallax-n.png
build $textures/parallax-h.ktx: texturec_height $pwd/parallax-h.png
build $textures/lightmap.ktx: texturec_height $pwd/../sky/lightmap.png

View File

@@ -35,6 +35,8 @@ rebuild:
@make -s --no-print-directory rebuild -C 31-rsm
@make -s --no-print-directory rebuild -C 33-pom
# @make -s --no-print-directory rebuild -C 34-mvs
# @make -s --no-print-directory rebuild -C 35-dynamic
@make -s --no-print-directory rebuild -C 36-sky
@make -s --no-print-directory rebuild -C common/debugdraw
@make -s --no-print-directory rebuild -C common/font
@make -s --no-print-directory rebuild -C common/imgui

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.