Updated makefiles.

This commit is contained in:
Branimir Karadžić
2016-02-29 19:58:17 -08:00
parent e8a0e69097
commit 861a63bf2e
26 changed files with 69 additions and 71 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,9 +1,18 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
include ../../scripts/shader-embeded.mk
BGFX_DIR=../..
RUNTIME_DIR=$(BGFX_DIR)/examples/runtime
BUILD_DIR=../../.build
include $(BGFX_DIR)/scripts/shader.mk
rebuild:
@make -s --no-print-directory clean all
@make -s --no-print-directory TARGET=0 clean all
@make -s --no-print-directory TARGET=1 clean all
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2013 Milos Tosic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2013-2014 Dario Manesku. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2013-2014 Dario Manesku. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -9,22 +9,10 @@ BUILD_DIR=../../.build
include $(BGFX_DIR)/scripts/shader.mk
GEOMETRY_SRC= \
bunny_patched \
bunny_decimated \
platform \
cube
GEOMETRY_BIN=$(addprefix $(RUNTIME_DIR)/meshes/, $(addsuffix .bin, $(basename $(GEOMETRY_SRC))))
geometry: $(GEOMETRY_BIN)
$(RUNTIME_DIR)/meshes/%.bin : %.obj
$(SILENT) $(GEOMETRYC) -f $(<) -o $(@) --packnormal 1
rebuild:
@make -s --no-print-directory TARGET=0 clean all
@make -s --no-print-directory TARGET=1 clean all
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2013-2014 Dario Manesku. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2013-2014 Dario Manesku. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -9,20 +9,10 @@ BUILD_DIR=../../.build
include $(BGFX_DIR)/scripts/shader.mk
GEOMETRY_SRC= \
tree \
hollowcube
GEOMETRY_BIN=$(addprefix $(RUNTIME_DIR)/meshes/, $(addsuffix .bin, $(basename $(GEOMETRY_SRC))))
geometry: $(GEOMETRY_BIN)
$(RUNTIME_DIR)/meshes/%.bin : %.obj
$(SILENT) $(GEOMETRYC) -f $(<) -o $(@) --packnormal 1
rebuild:
@make -s --no-print-directory TARGET=0 clean all
@make -s --no-print-directory TARGET=1 clean all
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,9 +1,18 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
include ../../scripts/shader-embeded.mk
BGFX_DIR=../..
RUNTIME_DIR=$(BGFX_DIR)/examples/runtime
BUILD_DIR=../../.build
include $(BGFX_DIR)/scripts/shader.mk
rebuild:
@make -s --no-print-directory clean all
@make -s --no-print-directory TARGET=0 clean all
@make -s --no-print-directory TARGET=1 clean all
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2014 Dario Manesku. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -1,5 +1,5 @@
#
# Copyright 2011-2015 Branimir Karadzic. All rights reserved.
# Copyright 2011-2016 Branimir Karadzic. All rights reserved.
# License: http://www.opensource.org/licenses/BSD-2-Clause
#
@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -66,7 +66,7 @@ void main()
float thickness = u_wfThickness;
vec3 fw = abs(dFdx(v_bc)) + abs(dFdy(v_bc));
vec3 val = smoothstep(vec3_splat(0.0), vec3_splat(fw*thickness), v_bc);
vec3 val = smoothstep(vec3_splat(0.0), fw*thickness, v_bc);
float edge = min(min(val.x, val.y), val.z); // Gets to 0.0 when close to edges.
vec3 edgeCol = mix(col, wfColor, wfOpacity);

View File

@@ -15,3 +15,4 @@ rebuild:
@make -s --no-print-directory TARGET=2 clean all
@make -s --no-print-directory TARGET=3 clean all
@make -s --no-print-directory TARGET=4 clean all
@make -s --no-print-directory TARGET=5 clean all

View File

@@ -34,25 +34,3 @@ rebuild:
@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/nanovg
metal:
@make -s --no-print-directory TARGET=5 -C 01-cubes
@make -s --no-print-directory TARGET=5 -C 03-raymarch
@make -s --no-print-directory TARGET=5 -C 04-mesh
@make -s --no-print-directory TARGET=5 -C 05-instancing
@make -s --no-print-directory TARGET=5 -C 06-bump
@make -s --no-print-directory TARGET=5 -C 07-callback
@make -s --no-print-directory TARGET=5 -C 08-update
@make -s --no-print-directory TARGET=5 -C 09-hdr
@make -s --no-print-directory TARGET=5 -C 12-lod
@make -s --no-print-directory TARGET=5 -C 13-stencil
@make -s --no-print-directory TARGET=5 -C 14-shadowvolumes
@make -s --no-print-directory TARGET=5 -C 15-shadowmaps-simple
@make -s --no-print-directory TARGET=5 -C 16-shadowmaps
@make -s --no-print-directory TARGET=5 -C 18-ibl
@make -s --no-print-directory TARGET=5 -C 19-oit
@make -s --no-print-directory TARGET=5 -C 21-deferred
@make -s --no-print-directory TARGET=5 -C 23-vectordisplay
@make -s --no-print-directory TARGET=5 -C 24-nbody
@make -s --no-print-directory TARGET=5 -C 27-terrain
@make -s --no-print-directory TARGET=5 -C 28-wireframe

View File

@@ -39,6 +39,13 @@
# define bvec4 bool4
# if BGFX_SHADER_LANGUAGE_HLSL > 3
# if BGFX_SHADER_LANGUAGE_HLSL > 4
# define dFdxCoarse(_x) ddx_coarse(_x)
# define dFdxFine(_x) ddx_fine(_x)
# define dFdyCoarse(_y) ddy_coarse(-_y)
# define dFdyFine(_y) ddy_fine(-_y)
# endif // BGFX_SHADER_LANGUAGE_HLSL > 4
struct BgfxSampler2D
{
SamplerState m_sampler;