Browse Source

Built assets.

Branimir Karadžić 8 years ago
parent
commit
016fd301b0
48 changed files with 22 additions and 9 deletions
  1. 3 3
      examples/36-sky/fs_sky_color_banding_fix.sc
  2. 10 0
      examples/36-sky/makefile
  3. 5 6
      examples/36-sky/sky.cpp
  4. 1 0
      examples/assets/meshes/meshes.ninja
  5. 1 0
      examples/assets/textures/textures.ninja
  6. 2 0
      examples/makefile
  7. BIN
      examples/runtime/meshes/bunny.bin
  8. BIN
      examples/runtime/meshes/bunny_decimated.bin
  9. BIN
      examples/runtime/meshes/bunny_patched.bin
  10. BIN
      examples/runtime/meshes/column.bin
  11. BIN
      examples/runtime/meshes/cube.bin
  12. BIN
      examples/runtime/meshes/hollowcube.bin
  13. BIN
      examples/runtime/meshes/orb.bin
  14. BIN
      examples/runtime/meshes/platform.bin
  15. BIN
      examples/runtime/meshes/test_scene.bin
  16. BIN
      examples/runtime/meshes/tree.bin
  17. BIN
      examples/runtime/meshes/tree1b_lod0_1.bin
  18. BIN
      examples/runtime/meshes/tree1b_lod0_2.bin
  19. BIN
      examples/runtime/meshes/tree1b_lod1_1.bin
  20. BIN
      examples/runtime/meshes/tree1b_lod1_2.bin
  21. BIN
      examples/runtime/meshes/tree1b_lod2_1.bin
  22. BIN
      examples/runtime/meshes/tree1b_lod2_2.bin
  23. BIN
      examples/runtime/shaders/dx11/fs_sky.bin
  24. BIN
      examples/runtime/shaders/dx11/fs_sky_color_banding_fix.bin
  25. BIN
      examples/runtime/shaders/dx11/fs_sky_landscape.bin
  26. BIN
      examples/runtime/shaders/dx11/vs_sky.bin
  27. BIN
      examples/runtime/shaders/dx11/vs_sky_landscape.bin
  28. BIN
      examples/runtime/shaders/dx9/fs_sky.bin
  29. BIN
      examples/runtime/shaders/dx9/fs_sky_color_banding_fix.bin
  30. BIN
      examples/runtime/shaders/dx9/fs_sky_landscape.bin
  31. BIN
      examples/runtime/shaders/dx9/vs_sky.bin
  32. BIN
      examples/runtime/shaders/dx9/vs_sky_landscape.bin
  33. BIN
      examples/runtime/shaders/essl/fs_sky.bin
  34. BIN
      examples/runtime/shaders/essl/fs_sky_color_banding_fix.bin
  35. BIN
      examples/runtime/shaders/essl/fs_sky_landscape.bin
  36. BIN
      examples/runtime/shaders/essl/vs_sky.bin
  37. BIN
      examples/runtime/shaders/essl/vs_sky_landscape.bin
  38. BIN
      examples/runtime/shaders/glsl/fs_sky.bin
  39. BIN
      examples/runtime/shaders/glsl/fs_sky_color_banding_fix.bin
  40. BIN
      examples/runtime/shaders/glsl/fs_sky_landscape.bin
  41. BIN
      examples/runtime/shaders/glsl/vs_sky.bin
  42. BIN
      examples/runtime/shaders/glsl/vs_sky_landscape.bin
  43. BIN
      examples/runtime/shaders/metal/fs_sky.bin
  44. BIN
      examples/runtime/shaders/metal/fs_sky_color_banding_fix.bin
  45. BIN
      examples/runtime/shaders/metal/fs_sky_landscape.bin
  46. BIN
      examples/runtime/shaders/metal/vs_sky.bin
  47. BIN
      examples/runtime/shaders/metal/vs_sky_landscape.bin
  48. BIN
      examples/runtime/textures/lightmap.ktx

+ 3 - 3
examples/36-sky/vs_sky_ColorBandingFix.sc → examples/36-sky/fs_sky_color_banding_fix.sc

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

+ 10 - 0
examples/36-sky/makefile

@@ -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

+ 5 - 6
examples/36-sky/sky.cpp

@@ -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:
  * This example demonstrates:
@@ -227,7 +227,7 @@ namespace
 	class SunController
 	class SunController
 	{
 	{
 	public:
 	public:
-		enum Month :int
+		enum Month : int
 		{
 		{
 			January = 0,
 			January = 0,
 			February,
 			February,
@@ -333,7 +333,7 @@ namespace
 			ProceduralSky::ScreenPosVertex::init();
 			ProceduralSky::ScreenPosVertex::init();
 
 
 			m_skyProgram = loadProgram("vs_sky", "fs_sky");
 			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;
 			m_preventBanding = true;
 
 
@@ -529,7 +529,6 @@ namespace
 			ImGui::End();
 			ImGui::End();
 		}
 		}
 
 
-
 		bool update() override
 		bool update() override
 		{
 		{
 			if (!entry::processEvents(m_width, m_height, m_debug, m_reset, &m_mouseState))
 			if (!entry::processEvents(m_width, m_height, m_debug, m_reset, &m_mouseState))

+ 1 - 0
examples/assets/meshes/meshes.ninja

@@ -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_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_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/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

+ 1 - 0
examples/assets/textures/textures.ninja

@@ -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-d.ktx: texturec_diffuse $pwd/parallax-d.png
 build $textures/parallax-n.ktx: texturec_normal  $pwd/parallax-n.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/parallax-h.ktx: texturec_height  $pwd/parallax-h.png
+build $textures/lightmap.ktx:   texturec_height  $pwd/../sky/lightmap.png

+ 2 - 0
examples/makefile

@@ -35,6 +35,8 @@ rebuild:
 	@make -s --no-print-directory rebuild -C 31-rsm
 	@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 33-pom
 #	@make -s --no-print-directory rebuild -C 34-mvs
 #	@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/debugdraw
 	@make -s --no-print-directory rebuild -C common/font
 	@make -s --no-print-directory rebuild -C common/font
 	@make -s --no-print-directory rebuild -C common/imgui
 	@make -s --no-print-directory rebuild -C common/imgui

BIN
examples/runtime/meshes/bunny.bin


BIN
examples/runtime/meshes/bunny_decimated.bin


BIN
examples/runtime/meshes/bunny_patched.bin


BIN
examples/runtime/meshes/column.bin


BIN
examples/runtime/meshes/cube.bin


BIN
examples/runtime/meshes/hollowcube.bin


BIN
examples/runtime/meshes/orb.bin


BIN
examples/runtime/meshes/platform.bin


BIN
examples/runtime/meshes/test_scene.bin


BIN
examples/runtime/meshes/tree.bin


BIN
examples/runtime/meshes/tree1b_lod0_1.bin


BIN
examples/runtime/meshes/tree1b_lod0_2.bin


BIN
examples/runtime/meshes/tree1b_lod1_1.bin


BIN
examples/runtime/meshes/tree1b_lod1_2.bin


BIN
examples/runtime/meshes/tree1b_lod2_1.bin


BIN
examples/runtime/meshes/tree1b_lod2_2.bin


BIN
examples/runtime/shaders/dx11/fs_sky.bin


BIN
examples/runtime/shaders/dx11/fs_sky_color_banding_fix.bin


BIN
examples/runtime/shaders/dx11/fs_sky_landscape.bin


BIN
examples/runtime/shaders/dx11/vs_sky.bin


BIN
examples/runtime/shaders/dx11/vs_sky_landscape.bin


BIN
examples/runtime/shaders/dx9/fs_sky.bin


BIN
examples/runtime/shaders/dx9/fs_sky_color_banding_fix.bin


BIN
examples/runtime/shaders/dx9/fs_sky_landscape.bin


BIN
examples/runtime/shaders/dx9/vs_sky.bin


BIN
examples/runtime/shaders/dx9/vs_sky_landscape.bin


BIN
examples/runtime/shaders/essl/fs_sky.bin


BIN
examples/runtime/shaders/essl/fs_sky_color_banding_fix.bin


BIN
examples/runtime/shaders/essl/fs_sky_landscape.bin


BIN
examples/runtime/shaders/essl/vs_sky.bin


BIN
examples/runtime/shaders/essl/vs_sky_landscape.bin


BIN
examples/runtime/shaders/glsl/fs_sky.bin


BIN
examples/runtime/shaders/glsl/fs_sky_color_banding_fix.bin


BIN
examples/runtime/shaders/glsl/fs_sky_landscape.bin


BIN
examples/runtime/shaders/glsl/vs_sky.bin


BIN
examples/runtime/shaders/glsl/vs_sky_landscape.bin


BIN
examples/runtime/shaders/metal/fs_sky.bin


BIN
examples/runtime/shaders/metal/fs_sky_color_banding_fix.bin


BIN
examples/runtime/shaders/metal/fs_sky_landscape.bin


BIN
examples/runtime/shaders/metal/vs_sky.bin


BIN
examples/runtime/shaders/metal/vs_sky_landscape.bin


BIN
examples/runtime/textures/lightmap.ktx