mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Built assets.
This commit is contained in:
@@ -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
10
examples/36-sky/makefile
Normal 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
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
BIN
examples/runtime/meshes/test_scene.bin
Normal file
BIN
examples/runtime/meshes/test_scene.bin
Normal file
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.
BIN
examples/runtime/shaders/dx11/fs_sky.bin
Normal file
BIN
examples/runtime/shaders/dx11/fs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/dx11/fs_sky_color_banding_fix.bin
Normal file
BIN
examples/runtime/shaders/dx11/fs_sky_color_banding_fix.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/dx11/fs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/dx11/fs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/dx11/vs_sky.bin
Normal file
BIN
examples/runtime/shaders/dx11/vs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/dx11/vs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/dx11/vs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/dx9/fs_sky.bin
Normal file
BIN
examples/runtime/shaders/dx9/fs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/dx9/fs_sky_color_banding_fix.bin
Normal file
BIN
examples/runtime/shaders/dx9/fs_sky_color_banding_fix.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/dx9/fs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/dx9/fs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/dx9/vs_sky.bin
Normal file
BIN
examples/runtime/shaders/dx9/vs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/dx9/vs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/dx9/vs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/essl/fs_sky.bin
Normal file
BIN
examples/runtime/shaders/essl/fs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/essl/fs_sky_color_banding_fix.bin
Normal file
BIN
examples/runtime/shaders/essl/fs_sky_color_banding_fix.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/essl/fs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/essl/fs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/essl/vs_sky.bin
Normal file
BIN
examples/runtime/shaders/essl/vs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/essl/vs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/essl/vs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/glsl/fs_sky.bin
Normal file
BIN
examples/runtime/shaders/glsl/fs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/glsl/fs_sky_color_banding_fix.bin
Normal file
BIN
examples/runtime/shaders/glsl/fs_sky_color_banding_fix.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/glsl/fs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/glsl/fs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/glsl/vs_sky.bin
Normal file
BIN
examples/runtime/shaders/glsl/vs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/glsl/vs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/glsl/vs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/metal/fs_sky.bin
Normal file
BIN
examples/runtime/shaders/metal/fs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/metal/fs_sky_color_banding_fix.bin
Normal file
BIN
examples/runtime/shaders/metal/fs_sky_color_banding_fix.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/metal/fs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/metal/fs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/metal/vs_sky.bin
Normal file
BIN
examples/runtime/shaders/metal/vs_sky.bin
Normal file
Binary file not shown.
BIN
examples/runtime/shaders/metal/vs_sky_landscape.bin
Normal file
BIN
examples/runtime/shaders/metal/vs_sky_landscape.bin
Normal file
Binary file not shown.
BIN
examples/runtime/textures/lightmap.ktx
Normal file
BIN
examples/runtime/textures/lightmap.ktx
Normal file
Binary file not shown.
Reference in New Issue
Block a user