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))
|
||||
|
||||
Reference in New Issue
Block a user