port from perforce
This commit is contained in:
1612
ev16-4k/4klang.asm
Normal file
1612
ev16-4k/4klang.asm
Normal file
File diff suppressed because it is too large
Load Diff
22
ev16-4k/4klang.h
Normal file
22
ev16-4k/4klang.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// some useful song defines for 4klang
|
||||
#define SAMPLE_RATE 44100
|
||||
#define BPM 160.014511
|
||||
#define MAX_INSTRUMENTS 6
|
||||
#define MAX_PATTERNS 100
|
||||
#define PATTERN_SIZE_SHIFT 4
|
||||
#define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
|
||||
#define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
|
||||
#define SAMPLES_PER_TICK 4134
|
||||
#define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
|
||||
#define POLYPHONY 2
|
||||
#define FLOAT_32BIT
|
||||
#define SAMPLE_TYPE float
|
||||
|
||||
#define WINDOWS_OBJECT
|
||||
|
||||
// declaration of the external synth render function, you'll always need that
|
||||
extern "C" void __stdcall _4klang_render(void*);
|
||||
// declaration of the external envelope buffer. access only if you're song was exported with that option
|
||||
extern "C" float _4klang_envelope_buffer;
|
||||
// declaration of the external note buffer. access only if you're song was exported with that option
|
||||
extern "C" int _4klang_note_buffer;
|
||||
807
ev16-4k/4klang.inc
Normal file
807
ev16-4k/4klang.inc
Normal file
@@ -0,0 +1,807 @@
|
||||
%macro export_func 1
|
||||
global _%1
|
||||
_%1:
|
||||
%endmacro
|
||||
%define USE_SECTIONS
|
||||
%define SAMPLE_RATE 44100
|
||||
%define MAX_INSTRUMENTS 6
|
||||
%define MAX_VOICES 2
|
||||
%define HLD 1
|
||||
%define BPM 160.014511
|
||||
%define MAX_PATTERNS 100
|
||||
%define PATTERN_SIZE_SHIFT 4
|
||||
%define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
|
||||
%define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
|
||||
%define SAMPLES_PER_TICK 4134
|
||||
%define DEF_LFO_NORMALIZE 0.0000604741
|
||||
%define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
|
||||
;%define GO4K_USE_16BIT_OUTPUT
|
||||
;%define GO4K_USE_GROOVE_PATTERN
|
||||
%define GO4K_USE_ENVELOPE_RECORDINGS
|
||||
;%define GO4K_USE_NOTE_RECORDINGS
|
||||
%define GO4K_CLIP_OUTPUT
|
||||
%define GO4K_USE_DST
|
||||
%define GO4K_USE_DLL
|
||||
%define GO4K_USE_PAN
|
||||
%define GO4K_USE_GLOBAL_DLL
|
||||
%define GO4K_USE_FLD
|
||||
%define GO4K_USE_ENV_CHECK
|
||||
%define GO4K_USE_ENV_MOD_GM
|
||||
%define GO4K_USE_VCO_CHECK
|
||||
%define GO4K_USE_VCO_PHASE_OFFSET
|
||||
%define GO4K_USE_VCO_SHAPE
|
||||
%define GO4K_USE_VCO_MOD_TM
|
||||
%define GO4K_USE_VCO_MOD_CM
|
||||
%define GO4K_USE_VCO_MOD_SM
|
||||
%define GO4K_USE_VCO_STEREO
|
||||
%define GO4K_USE_VCF_CHECK
|
||||
%define GO4K_USE_VCF_HIGH
|
||||
%define GO4K_USE_VCF_BAND
|
||||
%define GO4K_USE_VCF_PEAK
|
||||
%define GO4K_USE_VCF_STEREO
|
||||
%define GO4K_USE_DST_CHECK
|
||||
%define GO4K_USE_DST_STEREO
|
||||
%define GO4K_USE_DLL_CHORUS_CLAMP
|
||||
%define GO4K_USE_DLL_DAMP
|
||||
%define GO4K_USE_DLL_DC_FILTER
|
||||
%define GO4K_USE_FSTG_CHECK
|
||||
%define GO4K_USE_WAVESHAPER_CLIP
|
||||
%define GO4K_USE_FLD_MOD_VM
|
||||
%define MAX_DELAY 65536
|
||||
%define MAX_UNITS 48
|
||||
%define MAX_UNIT_SLOTS 9
|
||||
%define GO4K_BEGIN_CMDDEF(def_name)
|
||||
%define GO4K_END_CMDDEF db 0
|
||||
%define GO4K_BEGIN_PARAMDEF(def_name)
|
||||
%define GO4K_END_PARAMDEF
|
||||
GO4K_ENV_ID equ 1
|
||||
%macro GO4K_ENV 5
|
||||
db %1
|
||||
db %2
|
||||
db %3
|
||||
db %4
|
||||
db %5
|
||||
%endmacro
|
||||
%define ATTAC(val) val
|
||||
%define DECAY(val) val
|
||||
%define SUSTAIN(val) val
|
||||
%define RELEASE(val) val
|
||||
%define GAIN(val) val
|
||||
struc go4kENV_val
|
||||
.attac resd 1
|
||||
.decay resd 1
|
||||
.sustain resd 1
|
||||
.release resd 1
|
||||
.gain resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kENV_wrk
|
||||
.state resd 1
|
||||
.level resd 1
|
||||
.gm resd 1
|
||||
.am resd 1
|
||||
.dm resd 1
|
||||
.sm resd 1
|
||||
.rm resd 1
|
||||
.size
|
||||
endstruc
|
||||
%define ENV_STATE_ATTAC 0
|
||||
%define ENV_STATE_DECAY 1
|
||||
%define ENV_STATE_SUSTAIN 2
|
||||
%define ENV_STATE_RELEASE 3
|
||||
%define ENV_STATE_OFF 4
|
||||
GO4K_VCO_ID equ 2
|
||||
%macro GO4K_VCO 8
|
||||
db %1
|
||||
db %2
|
||||
%ifdef GO4K_USE_VCO_PHASE_OFFSET
|
||||
db %3
|
||||
%endif
|
||||
%ifdef GO4K_USE_VCO_GATE
|
||||
db %4
|
||||
%endif
|
||||
db %5
|
||||
%ifdef GO4K_USE_VCO_SHAPE
|
||||
db %6
|
||||
%endif
|
||||
db %7
|
||||
db %8
|
||||
%endmacro
|
||||
%define TRANSPOSE(val) val
|
||||
%define DETUNE(val) val
|
||||
%define PHASE(val) val
|
||||
%define GATES(val) val
|
||||
%define COLOR(val) val
|
||||
%define SHAPE(val) val
|
||||
%define FLAGS(val) val
|
||||
%define SINE 0x01
|
||||
%define TRISAW 0x02
|
||||
%define PULSE 0x04
|
||||
%define NOISE 0x08
|
||||
%define LFO 0x10
|
||||
%define GATE 0x20
|
||||
%define VCO_STEREO 0x40
|
||||
struc go4kVCO_val
|
||||
.transpose resd 1
|
||||
.detune resd 1
|
||||
%ifdef GO4K_USE_VCO_PHASE_OFFSET
|
||||
.phaseofs resd 1
|
||||
%endif
|
||||
%ifdef GO4K_USE_VCO_GATE
|
||||
.gate resd 1
|
||||
%endif
|
||||
.color resd 1
|
||||
%ifdef GO4K_USE_VCO_SHAPE
|
||||
.shape resd 1
|
||||
%endif
|
||||
.gain resd 1
|
||||
.flags resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kVCO_wrk
|
||||
.phase resd 1
|
||||
.tm resd 1
|
||||
.dm resd 1
|
||||
.fm resd 1
|
||||
.pm resd 1
|
||||
.cm resd 1
|
||||
.sm resd 1
|
||||
.gm resd 1
|
||||
.phase2 resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_VCF_ID equ 3
|
||||
%macro GO4K_VCF 3
|
||||
db %1
|
||||
db %2
|
||||
db %3
|
||||
%endmacro
|
||||
%define LOWPASS 0x1
|
||||
%define HIGHPASS 0x2
|
||||
%define BANDPASS 0x4
|
||||
%define BANDSTOP 0x3
|
||||
%define ALLPASS 0x7
|
||||
%define PEAK 0x8
|
||||
%define STEREO 0x10
|
||||
%define FREQUENCY(val) val
|
||||
%define RESONANCE(val) val
|
||||
%define VCFTYPE(val) val
|
||||
struc go4kVCF_val
|
||||
.freq resd 1
|
||||
.res resd 1
|
||||
.type resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kVCF_wrk
|
||||
.low resd 1
|
||||
.high resd 1
|
||||
.band resd 1
|
||||
.freq resd 1
|
||||
.fm resd 1
|
||||
.rm resd 1
|
||||
.low2 resd 1
|
||||
.high2 resd 1
|
||||
.band2 resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_DST_ID equ 4
|
||||
%macro GO4K_DST 3
|
||||
db %1
|
||||
%ifdef GO4K_USE_DST_SH
|
||||
db %2
|
||||
%ifdef GO4K_USE_DST_STEREO
|
||||
db %3
|
||||
%endif
|
||||
%else
|
||||
%ifdef GO4K_USE_DST_STEREO
|
||||
db %3
|
||||
%endif
|
||||
%endif
|
||||
%endmacro
|
||||
%define DRIVE(val) val
|
||||
%define SNHFREQ(val) val
|
||||
%define FLAGS(val) val
|
||||
struc go4kDST_val
|
||||
.drive resd 1
|
||||
%ifdef GO4K_USE_DST_SH
|
||||
.snhfreq resd 1
|
||||
%endif
|
||||
.flags resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kDST_wrk
|
||||
.out resd 1
|
||||
.snhphase resd 1
|
||||
.dm resd 1
|
||||
.sm resd 1
|
||||
.out2 resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_DLL_ID equ 5
|
||||
%macro GO4K_DLL 8
|
||||
db %1
|
||||
db %2
|
||||
db %3
|
||||
%ifdef GO4K_USE_DLL_DAMP
|
||||
db %4
|
||||
%endif
|
||||
%ifdef GO4K_USE_DLL_CHORUS
|
||||
db %5
|
||||
db %6
|
||||
%endif
|
||||
db %7
|
||||
db %8
|
||||
%endmacro
|
||||
%define PREGAIN(val) val
|
||||
%define DRY(val) val
|
||||
%define FEEDBACK(val) val
|
||||
%define DEPTH(val) val
|
||||
%define DAMP(val) val
|
||||
%define DELAY(val) val
|
||||
%define COUNT(val) val
|
||||
struc go4kDLL_val
|
||||
.pregain resd 1
|
||||
.dry resd 1
|
||||
.feedback resd 1
|
||||
%ifdef GO4K_USE_DLL_DAMP
|
||||
.damp resd 1
|
||||
%endif
|
||||
%ifdef GO4K_USE_DLL_CHORUS
|
||||
.freq resd 1
|
||||
.depth
|
||||
%endif
|
||||
.delay resd 1
|
||||
.count resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kDLL_wrk
|
||||
.index resd 1
|
||||
.store resd 1
|
||||
.dcin resd 1
|
||||
.dcout resd 1
|
||||
%ifdef GO4K_USE_DLL_CHORUS
|
||||
.phase resd 1
|
||||
%endif
|
||||
.buffer resd MAX_DELAY
|
||||
.size
|
||||
endstruc
|
||||
struc go4kDLL_wrk2
|
||||
.pm resd 1
|
||||
.fm resd 1
|
||||
.im resd 1
|
||||
.dm resd 1
|
||||
.sm resd 1
|
||||
.am resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_FOP_ID equ 6
|
||||
%macro GO4K_FOP 1
|
||||
db %1
|
||||
%endmacro
|
||||
%define OP(val) val
|
||||
%define FOP_POP 0x1
|
||||
%define FOP_ADDP 0x2
|
||||
%define FOP_MULP 0x3
|
||||
%define FOP_PUSH 0x4
|
||||
%define FOP_XCH 0x5
|
||||
%define FOP_ADD 0x6
|
||||
%define FOP_MUL 0x7
|
||||
%define FOP_ADDP2 0x8
|
||||
%define FOP_LOADNOTE 0x9
|
||||
%define FOP_MULP2 0xa
|
||||
struc go4kFOP_val
|
||||
.flags resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFOP_wrk
|
||||
.size
|
||||
endstruc
|
||||
GO4K_FST_ID equ 7
|
||||
%macro GO4K_FST 2
|
||||
db %1
|
||||
dw %2
|
||||
%endmacro
|
||||
%define AMOUNT(val) val
|
||||
%define DEST(val) val
|
||||
%define FST_SET 0x0000
|
||||
%define FST_ADD 0x4000
|
||||
%define FST_POP 0x8000
|
||||
struc go4kFST_val
|
||||
.amount resd 1
|
||||
.op1 resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFST_wrk
|
||||
.size
|
||||
endstruc
|
||||
GO4K_PAN_ID equ 8
|
||||
%macro GO4K_PAN 1
|
||||
%ifdef GO4K_USE_PAN
|
||||
db %1
|
||||
%endif
|
||||
%endmacro
|
||||
%define PANNING(val) val
|
||||
struc go4kPAN_val
|
||||
%ifdef GO4K_USE_PAN
|
||||
.panning resd 1
|
||||
%endif
|
||||
.size
|
||||
endstruc
|
||||
struc go4kPAN_wrk
|
||||
.pm resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_OUT_ID equ 9
|
||||
%macro GO4K_OUT 2
|
||||
db %1
|
||||
%ifdef GO4K_USE_GLOBAL_DLL
|
||||
db %2
|
||||
%endif
|
||||
%endmacro
|
||||
%define AUXSEND(val) val
|
||||
struc go4kOUT_val
|
||||
.gain resd 1
|
||||
%ifdef GO4K_USE_GLOBAL_DLL
|
||||
.auxsend resd 1
|
||||
%endif
|
||||
.size
|
||||
endstruc
|
||||
struc go4kOUT_wrk
|
||||
.am resd 1
|
||||
.gm resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_ACC_ID equ 10
|
||||
%macro GO4K_ACC 1
|
||||
db %1
|
||||
%endmacro
|
||||
%define OUTPUT 0
|
||||
%define AUX 8
|
||||
%define ACCTYPE(val) val
|
||||
struc go4kACC_val
|
||||
.acctype resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kACC_wrk
|
||||
.size
|
||||
endstruc
|
||||
%ifdef GO4K_USE_FLD
|
||||
GO4K_FLD_ID equ 11
|
||||
%macro GO4K_FLD 1
|
||||
db %1
|
||||
%endmacro
|
||||
%define VALUE(val) val
|
||||
struc go4kFLD_val
|
||||
.value resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFLD_wrk
|
||||
.vm resd 1
|
||||
.size
|
||||
endstruc
|
||||
%endif
|
||||
%ifdef GO4K_USE_FSTG
|
||||
GO4K_FSTG_ID equ 12
|
||||
%macro GO4K_FSTG 2
|
||||
db %1
|
||||
dw %2
|
||||
%endmacro
|
||||
struc go4kFSTG_val
|
||||
.amount resd 1
|
||||
.op1 resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFSTG_wrk
|
||||
.size
|
||||
endstruc
|
||||
%endif
|
||||
struc go4k_instrument
|
||||
.release resd 1
|
||||
.note resd 1
|
||||
.workspace resd MAX_UNITS*MAX_UNIT_SLOTS
|
||||
.dlloutl resd 1
|
||||
.dlloutr resd 1
|
||||
.outl resd 1
|
||||
.outr resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4k_synth
|
||||
.instruments resb go4k_instrument.size * MAX_INSTRUMENTS * MAX_VOICES
|
||||
.global resb go4k_instrument.size * MAX_VOICES
|
||||
.size
|
||||
endstruc
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc1 data align=1
|
||||
%else
|
||||
section .data align=1
|
||||
%endif
|
||||
go4k_patterns
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 36, 48, 60, 72, 74, HLD, 75, HLD, 60, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 36, 48, 60, 72, 75, HLD, 79, HLD, 60, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 36, 48, 60, 72, 80, HLD, 79, HLD, 60, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 48, 60, 72, 84, 92, HLD, 91, HLD, 72, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 91, 87, 84, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 89, 86, 82, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 87, 84, 80, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 72, 75, 79, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 48, 60, 72, 84, 86, HLD, 87, HLD, 72, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 48, 60, 72, 84, 87, HLD, 91, HLD, 72, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 43, 55, 67, 79, 92, HLD, 91, HLD, 67, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 91, 87, 84, 79, 91, 87, 84, 79, 91, 87, 84, 79, 91, 87, 84, 79,
|
||||
db 92, 87, 84, 80, 92, 87, 84, 80, 92, 87, 84, 80, 92, 87, 84, 80,
|
||||
db 92, 89, 86, 83, 92, 89, 86, 83, 92, 89, 86, 83, 92, 89, 86, 83,
|
||||
db 91, 86, 84, 79, 91, 86, 84, 79, 89, 86, 83, 79, 89, 86, 83, 79,
|
||||
db 92, 89, 86, 83, 80, 77, 74, 71, 68, 65, 62, 59, 56, 53, 50, 47,
|
||||
db 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 91, 89, 86, 83, 79, 77, 74, 71, 67, 65, 62, 59, 55, 53, 50, 47,
|
||||
db 60, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 60, HLD, HLD, HLD, HLD, HLD,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, HLD, 0, 0, 0, 0,
|
||||
db 60, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 60, HLD, 0, 0, 0, 0,
|
||||
db 60, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 60, HLD, HLD, HLD, 60, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 60, HLD, HLD, HLD, HLD, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 60, HLD, 0, 0, 0, 0,
|
||||
db 60, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 60, HLD, HLD, HLD, 60, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 67, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 67, HLD, HLD, HLD,
|
||||
db 0, 0, 0, 0, 67, HLD, HLD, HLD, HLD, HLD, 0, 0, 67, HLD, HLD, HLD,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 67, HLD, 0, 0, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 67, HLD, 0, 0, 67, HLD, 67, HLD,
|
||||
db 0, 0, 0, 0, 67, HLD, HLD, HLD, 67, HLD, 0, 0, 0, 0, 0, 0,
|
||||
db 67, HLD, 67, HLD, HLD, HLD, 67, HLD, 67, HLD, 0, 0, 67, HLD, 67, HLD,
|
||||
db 84, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db 48, HLD, HLD, HLD, 0, 0, 0, 0, 36, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db 44, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 44, HLD, 56, HLD, 44, HLD,
|
||||
db HLD, HLD, 43, HLD, 55, HLD, HLD, HLD, 43, HLD, HLD, HLD, 0, 0, 0, 0,
|
||||
db 0, 0, 41, HLD, HLD, HLD, HLD, HLD, 0, 0, 53, HLD, 41, HLD, 53, HLD,
|
||||
db HLD, HLD, 48, HLD, 60, HLD, 36, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0,
|
||||
db 48, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 60, HLD, 0, 0,
|
||||
db 0, 0, 0, 0, 36, HLD, HLD, HLD, 48, HLD, 36, HLD, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 48, HLD, HLD, HLD, HLD, HLD, 36, HLD, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 41, HLD, HLD, HLD, 53, HLD, 41, HLD, 0, 0, 0, 0,
|
||||
db 43, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 55, HLD, 0, 0,
|
||||
db 0, 0, 0, 0, 55, HLD, HLD, HLD, HLD, HLD, 79, HLD, 67, HLD, 0, 0,
|
||||
db 0, 0, 0, 0, 55, HLD, HLD, HLD, HLD, HLD, 67, HLD, 0, 0, 0, 0,
|
||||
db 55, HLD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, HLD, 74, HLD,
|
||||
db 75, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 74, HLD, 75, HLD,
|
||||
db 77, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 72, HLD, HLD, HLD,
|
||||
db 71, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 71, HLD, 72, HLD,
|
||||
db 74, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 79, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db 75, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 75, HLD, HLD, HLD,
|
||||
db 77, HLD, 0, 0, 77, HLD, 80, HLD, HLD, HLD, 77, HLD, HLD, HLD, HLD, HLD,
|
||||
db 79, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db HLD, HLD, HLD, HLD, 83, HLD, 86, HLD, HLD, HLD, HLD, HLD, 79, HLD, HLD, HLD,
|
||||
db 79, HLD, 0, 0, 77, HLD, 80, HLD, HLD, HLD, 77, HLD, HLD, HLD, HLD, HLD,
|
||||
db 79, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
go4k_patterns_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc2 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
go4k_pattern_lists
|
||||
Instrument0List db 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 10, 9, 4, 9, 10, 9, 11, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 14, 15, 16, 17, 1, 2, 1, 3, 1, 2, 1, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 10, 9, 4, 9, 10, 9, 11, 12, 13, 14, 15, 12, 13, 14, 18, 1, 0, 0, 0,
|
||||
Instrument1List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 22, 23, 22, 23, 22, 23, 22, 24, 22, 23, 22, 23, 22, 23, 22, 24, 22, 23, 22, 24, 22, 23, 22, 24, 22, 23, 22, 24, 25, 20, 19, 20, 22, 23, 22, 23, 22, 23, 22, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 22, 23, 22, 24, 22, 23, 25, 20, 22, 26, 0, 0,
|
||||
Instrument2List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 29, 29, 29, 29, 29, 29, 29, 30, 29, 29, 29, 29, 29, 29, 29, 30, 29, 29, 29, 30, 29, 29, 29, 30, 29, 29, 29, 30, 31, 32, 0, 27, 29, 29, 29, 29, 29, 29, 29, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 29, 29, 29, 30, 29, 29, 31, 32, 29, 0, 0, 0,
|
||||
Instrument3List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
Instrument4List db 0, 0, 0, 0, 35, 0, 35, 0, 35, 0, 35, 0, 35, 0, 35, 0, 36, 37, 38, 39, 36, 37, 38, 39, 36, 39, 38, 37, 36, 39, 38, 37, 40, 41, 40, 42, 40, 43, 44, 45, 40, 43, 44, 46, 40, 43, 44, 46, 40, 43, 44, 46, 40, 43, 44, 46, 40, 43, 44, 46, 44, 46, 0, 47, 35, 0, 35, 0, 35, 0, 35, 0, 36, 37, 38, 39, 36, 37, 38, 39, 36, 39, 38, 37, 36, 39, 38, 37, 40, 43, 44, 45, 40, 43, 44, 46, 35, 0, 0, 0,
|
||||
Instrument5List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 49, 50, 51, 52, 53, 54, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
go4k_pattern_lists_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc3 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
go4k_synth_instructions
|
||||
GO4K_BEGIN_CMDDEF(Instrument0)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument1)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument2)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument3)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument4)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument5)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Global)
|
||||
db GO4K_ACC_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_ACC_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
go4k_synth_instructions_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc4 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
go4k_synth_parameter_values
|
||||
GO4K_BEGIN_PARAMDEF(Instrument0)
|
||||
GO4K_ENV ATTAC(32),DECAY(62),SUSTAIN(0),RELEASE(64),GAIN(72)
|
||||
GO4K_FST AMOUNT(128),DEST(13*MAX_UNIT_SLOTS+0+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(40),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(66),DEST(9*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(32),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(56),DEST(8*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(48),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(80),DEST(11*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(76),DETUNE(62),PHASE(48),GATES(0),COLOR(32),SHAPE(40),GAIN(128),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_VCO TRANSPOSE(76),DETUNE(68),PHASE(0),GATES(0),COLOR(112),SHAPE(8),GAIN(64),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(72),PHASE(96),GATES(0),COLOR(120),SHAPE(96),GAIN(32),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_FLD VALUE(64)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP2)
|
||||
GO4K_VCF FREQUENCY(96),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(64),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(17),COUNT(1)
|
||||
GO4K_FOP OP(FOP_XCH)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(64),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(17),COUNT(1)
|
||||
GO4K_OUT GAIN(32), AUXSEND(48)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument1)
|
||||
GO4K_ENV ATTAC(16),DECAY(64),SUSTAIN(0),RELEASE(72),GAIN(128)
|
||||
GO4K_FST AMOUNT(100),DEST(0*MAX_UNIT_SLOTS+2+FST_SET)
|
||||
GO4K_ENV ATTAC(0),DECAY(56),SUSTAIN(0),RELEASE(0),GAIN(128)
|
||||
GO4K_DST DRIVE(32), SNHFREQ(128), FLAGS(0)
|
||||
GO4K_FST AMOUNT(88),DEST(6*MAX_UNIT_SLOTS+1+FST_SET)
|
||||
GO4K_FOP OP(FOP_POP)
|
||||
GO4K_VCO TRANSPOSE(52),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(64),GAIN(128),FLAGS(SINE)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_PAN PANNING(64)
|
||||
GO4K_OUT GAIN(128), AUXSEND(0)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument2)
|
||||
GO4K_ENV ATTAC(16),DECAY(72),SUSTAIN(0),RELEASE(72),GAIN(128)
|
||||
GO4K_FST AMOUNT(128),DEST(0*MAX_UNIT_SLOTS+2+FST_SET)
|
||||
GO4K_ENV ATTAC(0),DECAY(56),SUSTAIN(0),RELEASE(0),GAIN(128)
|
||||
GO4K_FST AMOUNT(108),DEST(6*MAX_UNIT_SLOTS+1+FST_SET)
|
||||
GO4K_FST AMOUNT(72),DEST(7*MAX_UNIT_SLOTS+1+FST_SET)
|
||||
GO4K_FOP OP(FOP_POP)
|
||||
GO4K_VCO TRANSPOSE(32),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(32),GAIN(128),FLAGS(SINE)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(80),GAIN(64),FLAGS(SINE)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(85),COLOR(64),SHAPE(64),GAIN(64),FLAGS(NOISE)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(96),VCFTYPE(LOWPASS)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_VCF FREQUENCY(24),RESONANCE(32),VCFTYPE(HIGHPASS)
|
||||
GO4K_DST DRIVE(16), SNHFREQ(128), FLAGS(0)
|
||||
GO4K_PAN PANNING(72)
|
||||
GO4K_OUT GAIN(96), AUXSEND(24)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument3)
|
||||
GO4K_ENV ATTAC(0),DECAY(128),SUSTAIN(128),RELEASE(0),GAIN(96)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(0),COLOR(0),SHAPE(64),GAIN(84),FLAGS(NOISE)
|
||||
GO4K_VCF FREQUENCY(96),RESONANCE(128),VCFTYPE(BANDPASS)
|
||||
GO4K_VCO TRANSPOSE(76),DETUNE(64),PHASE(0),GATES(51),COLOR(0),SHAPE(32),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_VCO TRANSPOSE(52),DETUNE(64),PHASE(64),GATES(51),COLOR(0),SHAPE(64),GAIN(64),FLAGS(TRISAW|LFO)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(51),COLOR(0),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_DST DRIVE(32), SNHFREQ(128), FLAGS(0)
|
||||
GO4K_DLL PREGAIN(72),DRY(128),FEEDBACK(128),DAMP(128),FREQUENCY(0),DEPTH(0),DELAY(18),COUNT(1)
|
||||
GO4K_VCF FREQUENCY(128),RESONANCE(32),VCFTYPE(PEAK)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_PAN PANNING(72)
|
||||
GO4K_OUT GAIN(8), AUXSEND(4)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument4)
|
||||
GO4K_ENV ATTAC(0),DECAY(64),SUSTAIN(64),RELEASE(64),GAIN(128)
|
||||
GO4K_VCO TRANSPOSE(80),DETUNE(64),PHASE(0),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(96),DEST(0*MAX_UNIT_SLOTS+2+FST_SET+FST_POP)
|
||||
GO4K_FST AMOUNT(128),DEST(15*MAX_UNIT_SLOTS+0+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(72),PHASE(48),GATES(0),COLOR(96),SHAPE(64),GAIN(64),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(60),PHASE(16),GATES(0),COLOR(96),SHAPE(32),GAIN(128),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_DST DRIVE(127), SNHFREQ(128), FLAGS(STEREO)
|
||||
GO4K_VCF FREQUENCY(128),RESONANCE(48),VCFTYPE(BANDSTOP|STEREO)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(62),PHASE(96),GATES(0),COLOR(128),SHAPE(16),GAIN(128),FLAGS(SINE|VCO_STEREO)
|
||||
GO4K_VCF FREQUENCY(72),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(76),PHASE(96),GATES(0),COLOR(16),SHAPE(112),GAIN(128),FLAGS(SINE|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_FLD VALUE(64)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP2)
|
||||
GO4K_OUT GAIN(32), AUXSEND(24)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument5)
|
||||
GO4K_ENV ATTAC(32),DECAY(96),SUSTAIN(0),RELEASE(32),GAIN(64)
|
||||
GO4K_VCO TRANSPOSE(48),DETUNE(64),PHASE(0),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(128),DEST(6*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(52),DETUNE(64),PHASE(32),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(128),DEST(7*MAX_UNIT_SLOTS+6+FST_SET+FST_POP)
|
||||
GO4K_FST AMOUNT(128),DEST(17*MAX_UNIT_SLOTS+0+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(72),PHASE(48),GATES(0),COLOR(96),SHAPE(64),GAIN(64),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(60),PHASE(16),GATES(0),COLOR(96),SHAPE(32),GAIN(128),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_DST DRIVE(127), SNHFREQ(128), FLAGS(STEREO)
|
||||
GO4K_VCF FREQUENCY(128),RESONANCE(48),VCFTYPE(BANDSTOP|STEREO)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(62),PHASE(96),GATES(0),COLOR(128),SHAPE(16),GAIN(128),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(76),PHASE(96),GATES(0),COLOR(16),SHAPE(112),GAIN(128),FLAGS(SINE|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_FLD VALUE(64)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP2)
|
||||
GO4K_OUT GAIN(32), AUXSEND(24)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Global)
|
||||
GO4K_ACC ACCTYPE(AUX)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(96),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(1),COUNT(8)
|
||||
GO4K_FOP OP(FOP_XCH)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(96),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(9),COUNT(8)
|
||||
GO4K_FOP OP(FOP_XCH)
|
||||
GO4K_ACC ACCTYPE(OUTPUT)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCF FREQUENCY(4),RESONANCE(64),VCFTYPE(HIGHPASS|STEREO)
|
||||
GO4K_DST DRIVE(64), SNHFREQ(128), FLAGS(STEREO)
|
||||
GO4K_OUT GAIN(88), AUXSEND(0)
|
||||
GO4K_END_PARAMDEF
|
||||
go4k_synth_parameter_values_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc5 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
%ifdef GO4K_USE_DLL
|
||||
global _go4k_delay_times
|
||||
_go4k_delay_times
|
||||
dw 0
|
||||
dw 1116
|
||||
dw 1188
|
||||
dw 1276
|
||||
dw 1356
|
||||
dw 1422
|
||||
dw 1492
|
||||
dw 1556
|
||||
dw 1618
|
||||
dw 1140
|
||||
dw 1212
|
||||
dw 1300
|
||||
dw 1380
|
||||
dw 1446
|
||||
dw 1516
|
||||
dw 1580
|
||||
dw 1642
|
||||
dw 16536
|
||||
dw 4134
|
||||
%endif
|
||||
BIN
ev16-4k/4klang.obj
Normal file
BIN
ev16-4k/4klang.obj
Normal file
Binary file not shown.
BIN
ev16-4k/8klang.merge
Normal file
BIN
ev16-4k/8klang.merge
Normal file
Binary file not shown.
BIN
ev16-4k/GlU32.Lib
Normal file
BIN
ev16-4k/GlU32.Lib
Normal file
Binary file not shown.
368
ev16-4k/Shaders.cpp
Normal file
368
ev16-4k/Shaders.cpp
Normal file
@@ -0,0 +1,368 @@
|
||||
#include "Shaders.h"
|
||||
|
||||
//#define DEBUG_COMPRESSED_SHADER
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
PFNGLCREATESHADERPROC glCreateShader = NULL;
|
||||
PFNGLSHADERSOURCEPROC glShaderSource = NULL;
|
||||
PFNGLCOMPILESHADERPROC glCompileShader = NULL;
|
||||
PFNGLGETSHADERIVPROC glGetShaderiv = NULL;
|
||||
PFNGLGETPROGRAMIVPROC glGetProgramiv = NULL;
|
||||
PFNGLCREATEPROGRAMPROC glCreateProgram = NULL;
|
||||
PFNGLATTACHSHADERPROC glAttachShader = NULL;
|
||||
PFNGLLINKPROGRAMPROC glLinkProgram = NULL;
|
||||
PFNGLUSEPROGRAMPROC glUseProgram = NULL;
|
||||
PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog = NULL;
|
||||
PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog = NULL;
|
||||
|
||||
|
||||
void useProgram(GLhandleARB ah_Program)
|
||||
{
|
||||
glUseProgram(ah_Program);
|
||||
}
|
||||
|
||||
|
||||
void initShaders()
|
||||
{
|
||||
glCreateShader = (PFNGLCREATESHADERPROC)myGetProcAddress("glCreateShader");
|
||||
glShaderSource = (PFNGLSHADERSOURCEPROC)myGetProcAddress("glShaderSource");
|
||||
glCompileShader = (PFNGLCOMPILESHADERPROC)myGetProcAddress("glCompileShader");
|
||||
glGetShaderiv = (PFNGLGETSHADERIVPROC)myGetProcAddress("glGetShaderiv");
|
||||
glGetProgramiv = (PFNGLGETPROGRAMIVPROC)myGetProcAddress("glGetProgramiv");
|
||||
glCreateProgram = (PFNGLCREATEPROGRAMPROC)myGetProcAddress("glCreateProgram");
|
||||
glAttachShader = (PFNGLATTACHSHADERPROC)myGetProcAddress("glAttachShader");
|
||||
glLinkProgram = (PFNGLLINKPROGRAMPROC)myGetProcAddress("glLinkProgram");
|
||||
glUseProgram = (PFNGLUSEPROGRAMPROC)myGetProcAddress("glUseProgram");
|
||||
glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)myGetProcAddress("glGetShaderInfoLog");
|
||||
glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)myGetProcAddress("glGetProgramInfoLog");
|
||||
|
||||
if (!(glCreateShader && glShaderSource && glCompileShader && glGetShaderiv && glGetProgramiv && glCreateProgram && glAttachShader && glLinkProgram && glUseProgram && glGetShaderInfoLog && glGetProgramInfoLog))
|
||||
{
|
||||
std::cerr << "Some shader functions are not available!" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
|
||||
std::string ReplaceString(const std::string &stringSearchString, const std::string &stringReplaceString, std::string stringStringToReplace)
|
||||
{
|
||||
std::string::size_type pos = stringStringToReplace.find(stringSearchString, 0);
|
||||
int intLengthSearch = stringSearchString.length();
|
||||
int intLengthReplacment = stringReplaceString.length();
|
||||
|
||||
while(std::string::npos != pos)
|
||||
{
|
||||
stringStringToReplace.replace(pos, intLengthSearch, stringReplaceString);
|
||||
pos = stringStringToReplace.find(stringSearchString, pos + intLengthReplacment);
|
||||
}
|
||||
|
||||
return stringStringToReplace;
|
||||
}
|
||||
|
||||
std::string MakeFileName( const char* as_FileName, int ShaderID, bool bDebug )
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << as_FileName << "_" << ShaderID;
|
||||
if( bDebug )
|
||||
{
|
||||
ss << "_dbg";
|
||||
}
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
void CreateSubShader( const char* as_FileName, int ShaderID, bool bDebug )
|
||||
{
|
||||
char* ls_ShaderSource = textFileRead(as_FileName);
|
||||
std::string strData= ls_ShaderSource;
|
||||
std::string strNewData;
|
||||
bool bRemove= false;
|
||||
for( size_t i= 0; i < strData.size(); ++i )
|
||||
{
|
||||
bool bEndRemove= false;
|
||||
if( strData[ i ] == '@' )
|
||||
{
|
||||
if( i + 2 >= strData.size() )
|
||||
{
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
if( strData[ i ] == '@' )
|
||||
{
|
||||
bRemove= false;
|
||||
}
|
||||
else if( strData[ i ] == 'D' )
|
||||
{
|
||||
bRemove= !bDebug;
|
||||
}
|
||||
else if( strData[ i ] == 'R' )
|
||||
{
|
||||
bRemove= bDebug;
|
||||
}
|
||||
else
|
||||
{
|
||||
int ID= (int)(strData[ i ] - '0');
|
||||
bRemove= ID!=ShaderID;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if( !bRemove || strData[ i ] == 10 || strData[ i ] == 13)
|
||||
{
|
||||
strNewData+= strData[ i ];
|
||||
}
|
||||
}
|
||||
|
||||
std::string strFileOut= MakeFileName( as_FileName, ShaderID, bDebug );
|
||||
std::ofstream ofs(strFileOut.c_str());
|
||||
|
||||
// some Renaming
|
||||
/*strNewData= ReplaceString( "rayDir","q", strNewData);
|
||||
strNewData= ReplaceString( "cRes","b", strNewData);
|
||||
strNewData= ReplaceString( "cFac","a", strNewData);
|
||||
strNewData= ReplaceString( "CurStep","d", strNewData);
|
||||
strNewData= ReplaceString( "CurStep","d", strNewData);
|
||||
strNewData= ReplaceString( "rotate","r", strNewData);
|
||||
strNewData= ReplaceString( "repeatHex","sh", strNewData);
|
||||
strNewData= ReplaceString( "repeat","s", strNewData);
|
||||
strNewData= ReplaceString( "pi2","P", strNewData);
|
||||
strNewData= ReplaceString( "sqrtOf075","Q", strNewData);
|
||||
strNewData= ReplaceString( "EndlessBar","O", strNewData);
|
||||
strNewData= ReplaceString( "CurTime","R", strNewData);
|
||||
strNewData= ReplaceString( "CurScene","S", strNewData);
|
||||
strNewData= ReplaceString( "torus","T", strNewData);
|
||||
strNewData= ReplaceString( "noise3D","N", strNewData);
|
||||
strNewData= ReplaceString( "smoothnoise","M", strNewData);*/
|
||||
|
||||
ofs << strNewData;
|
||||
}
|
||||
|
||||
void CreateAllSubShader( const char* as_FileName )
|
||||
{
|
||||
for( int i= 0; i < MAX_SHADER_ID; ++i )
|
||||
{
|
||||
CreateSubShader( as_FileName, i, true );
|
||||
CreateSubShader( as_FileName, i, false );
|
||||
}
|
||||
}
|
||||
|
||||
void PrintErrors()
|
||||
{
|
||||
GLenum lr_Error = GL_NO_ERROR;
|
||||
int li_ErrorCount = 5;
|
||||
do
|
||||
{
|
||||
lr_Error = glGetError();
|
||||
if (lr_Error != GL_NO_ERROR)
|
||||
{
|
||||
li_ErrorCount--;
|
||||
char* ls_ErrorString = (char*)gluErrorString(lr_Error);
|
||||
if (ls_ErrorString != 0)
|
||||
std::cout << "OPENGL :: ERROR " << ls_ErrorString << std::endl;
|
||||
}
|
||||
if (li_ErrorCount == 0)
|
||||
{
|
||||
std::cout << "OPENGL :: ERROR Too many errors!" << std::endl;
|
||||
break;
|
||||
}
|
||||
} while (lr_Error != GL_NO_ERROR);
|
||||
}
|
||||
|
||||
|
||||
GLhandleARB createVertexShader(const char* as_FileName)
|
||||
{
|
||||
GLhandleARB lh_Shader = 0;
|
||||
|
||||
char* ls_ShaderSource = textFileRead(as_FileName);
|
||||
|
||||
if (ls_ShaderSource == NULL)
|
||||
{
|
||||
std::cerr << "Error reading file: " << as_FileName << std::endl;
|
||||
return lh_Shader;
|
||||
}
|
||||
|
||||
lh_Shader = glCreateShader(GL_VERTEX_SHADER);
|
||||
|
||||
glShaderSource(lh_Shader, 1, (const char**)&ls_ShaderSource, NULL);
|
||||
glCompileShader(lh_Shader);
|
||||
|
||||
free(ls_ShaderSource);
|
||||
|
||||
int li_Status = 0;
|
||||
glGetShaderiv(lh_Shader, GL_COMPILE_STATUS, &li_Status);
|
||||
|
||||
if (li_Status == GL_FALSE)
|
||||
{
|
||||
std::cerr << "Error compiling vertex shader: " << as_FileName << std::endl;
|
||||
printShaderInfoLog(lh_Shader);
|
||||
}
|
||||
|
||||
return lh_Shader;
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG_COMPRESSED_SHADER
|
||||
#include "shader_code.h"
|
||||
#endif
|
||||
|
||||
GLhandleARB createFragmentShader(const char* as_FileName, int ShaderID, bool bDebug)
|
||||
{
|
||||
CreateAllSubShader( as_FileName );
|
||||
|
||||
GLhandleARB lh_Shader = 0;
|
||||
|
||||
char* ls_ShaderSource = textFileRead(MakeFileName(as_FileName, ShaderID, bDebug).c_str());
|
||||
if (ls_ShaderSource == NULL)
|
||||
{
|
||||
std::cerr << "Error reading file: " << as_FileName << std::endl;
|
||||
return lh_Shader;
|
||||
}
|
||||
|
||||
lh_Shader = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
|
||||
glShaderSource(lh_Shader, 1, (const char**)&ls_ShaderSource, NULL);
|
||||
#ifdef DEBUG_COMPRESSED_SHADER
|
||||
glShaderSource(lh_Shader, 1, (const char**)&mark_fs, NULL);
|
||||
#endif
|
||||
glCompileShader(lh_Shader);
|
||||
|
||||
int li_Status = 0;
|
||||
|
||||
glGetShaderiv(lh_Shader, GL_COMPILE_STATUS, &li_Status);
|
||||
|
||||
if (li_Status == GL_FALSE)
|
||||
{
|
||||
std::cerr << "Error compiling fragment shader: " << as_FileName << std::endl;
|
||||
printShaderInfoLog(lh_Shader);
|
||||
}
|
||||
|
||||
free(ls_ShaderSource);
|
||||
|
||||
return lh_Shader;
|
||||
}
|
||||
|
||||
|
||||
GLhandleARB createProgram(GLhandleARB ah_VertexShader, GLhandleARB ah_FragmentShader)
|
||||
{
|
||||
GLhandleARB lh_Program = 0;
|
||||
|
||||
if (ah_VertexShader + ah_FragmentShader <= 1)
|
||||
{
|
||||
std::cerr << "Cannot create program." << std::endl;
|
||||
return lh_Program;
|
||||
}
|
||||
|
||||
lh_Program = glCreateProgram();
|
||||
|
||||
glAttachShader(lh_Program, ah_VertexShader);
|
||||
glAttachShader(lh_Program, ah_FragmentShader);
|
||||
glLinkProgram(lh_Program);
|
||||
|
||||
int li_Status = 0;
|
||||
|
||||
glGetProgramiv(lh_Program, GL_LINK_STATUS, &li_Status);
|
||||
|
||||
if (li_Status == GL_FALSE)
|
||||
{
|
||||
std::cerr << "Error linking shaders." << std::endl;
|
||||
printProgramInfoLog(lh_Program);
|
||||
}
|
||||
|
||||
return lh_Program;
|
||||
}
|
||||
|
||||
|
||||
char* textFileRead(const char* as_FileName)
|
||||
{
|
||||
FILE* lh_File;
|
||||
char* ls_Content = NULL;
|
||||
size_t li_Count = 0;
|
||||
|
||||
if (as_FileName != NULL)
|
||||
{
|
||||
fopen_s(&lh_File, as_FileName, "rt");
|
||||
|
||||
if (lh_File != NULL)
|
||||
{
|
||||
fseek(lh_File, 0, SEEK_END);
|
||||
li_Count = ftell(lh_File);
|
||||
rewind(lh_File);
|
||||
|
||||
if (li_Count > 0)
|
||||
{
|
||||
ls_Content = (char*) malloc(sizeof(char) * (li_Count + 1));
|
||||
li_Count = fread(ls_Content, sizeof(char), li_Count, lh_File);
|
||||
ls_Content[li_Count] = '\0';
|
||||
}
|
||||
|
||||
fclose(lh_File);
|
||||
}
|
||||
}
|
||||
|
||||
return ls_Content;
|
||||
}
|
||||
|
||||
|
||||
void printShaderInfoLog(GLhandleARB ah_Shader)
|
||||
{
|
||||
int li_InfologLength = 0;
|
||||
int li_CharsWritten = 0;
|
||||
char* li_InfoLog;
|
||||
|
||||
glGetShaderiv(ah_Shader, GL_INFO_LOG_LENGTH, &li_InfologLength);
|
||||
|
||||
if (li_InfologLength > 0)
|
||||
{
|
||||
li_InfoLog = (char*) malloc(li_InfologLength);
|
||||
|
||||
glGetShaderInfoLog(ah_Shader, li_InfologLength, &li_CharsWritten, li_InfoLog);
|
||||
|
||||
std::cerr << li_InfoLog << std::endl;
|
||||
free(li_InfoLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void printProgramInfoLog(GLhandleARB ah_Program)
|
||||
{
|
||||
int li_InfologLength = 0;
|
||||
int li_CharsWritten = 0;
|
||||
char* ls_InfoLog;
|
||||
|
||||
glGetProgramiv(ah_Program, GL_INFO_LOG_LENGTH, &li_InfologLength);
|
||||
|
||||
if (li_InfologLength > 0)
|
||||
{
|
||||
ls_InfoLog = (char *)malloc(li_InfologLength);
|
||||
|
||||
glGetProgramInfoLog(ah_Program, li_InfologLength, &li_CharsWritten, ls_InfoLog);
|
||||
|
||||
std::cerr << ls_InfoLog << std::endl;
|
||||
free(ls_InfoLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool printShaderStatistics()
|
||||
{
|
||||
if (GL_VERSION_2_1) std::cout << "Supports OpenGL 2.1. " << std::endl;
|
||||
else if (GL_VERSION_2_0) std::cout << "Supports OpenGL 2.0. " << std::endl;
|
||||
else if (GL_VERSION_1_5) std::cout << "Supports OpenGL 1.5. " << std::endl;
|
||||
else if (GL_VERSION_1_4) std::cout << "Supports OpenGL 1.4. " << std::endl;
|
||||
else if (GL_VERSION_1_3) std::cout << "Supports OpenGL 1.3. " << std::endl;
|
||||
else if (GL_VERSION_1_2) std::cout << "Supports OpenGL 1.2. " << std::endl;
|
||||
else if (GL_VERSION_1_1) std::cout << "Supports OpenGL 1.1. " << std::endl;
|
||||
|
||||
if (GL_ARB_shader_objects && GL_ARB_vertex_shader && GL_ARB_fragment_shader)
|
||||
{
|
||||
std::cout << "Status: Using GLSL " << glGetString(GL_SHADING_LANGUAGE_VERSION_ARB) << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "No GLSL support!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
21
ev16-4k/Shaders.h
Normal file
21
ev16-4k/Shaders.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#define MAX_SHADER_ID 4
|
||||
|
||||
#include <windows.h>
|
||||
#include <iostream>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include "glext.h"
|
||||
#define myGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
|
||||
|
||||
void initShaders();
|
||||
GLhandleARB createVertexShader(const char* as_FileName);
|
||||
GLhandleARB createFragmentShader(const char* as_FileName, int ShaderID, bool bDebug);
|
||||
GLhandleARB createProgram(GLhandleARB ah_VertexShader, GLhandleARB ah_FragmentShader);
|
||||
void PrintErrors();
|
||||
void useProgram(GLhandleARB ah_Program);
|
||||
char* textFileRead(const char* as_FileName);
|
||||
void printShaderInfoLog(GLhandleARB ah_Shader);
|
||||
void printProgramInfoLog(GLhandleARB ah_Program);
|
||||
bool printShaderStatistics();
|
||||
369
ev16-4k/bp4k.vcproj
Normal file
369
ev16-4k/bp4k.vcproj
Normal file
@@ -0,0 +1,369 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="bp4k"
|
||||
ProjectGUID="{213903DE-E40A-4D23-9310-E520AC2B412E}"
|
||||
RootNamespace="bp4k"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)bin"
|
||||
IntermediateDirectory="$(SolutionDir)obj\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
CallingConvention="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Gdi32.lib user32.lib opengl32.lib winmm.lib glu32.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_$(ConfigurationName).exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(ProjectDir)""
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
EntryPointSymbol="main"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)bin"
|
||||
IntermediateDirectory="$(SolutionDir)obj\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="rem minify\shader_minifier.exe "mark.fs_0" -o mark_0.h -v --no-renaming
rem minify\shader_minifier.exe "mark.fs_1" -o mark_1.h -v --no-renaming
rem minify\shader_minifier.exe "mark.fs_2" -o mark_2.h -v --no-renaming
rem minify\shader_minifier.exe "mark.fs_0" -o mark_small.h -v
"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="2"
|
||||
WholeProgramOptimization="false"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="0"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/CRINKLER"
|
||||
AdditionalDependencies="Gdi32.lib user32.lib opengl32.lib winmm.lib libcmt.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_$(ConfigurationName).exe"
|
||||
AdditionalLibraryDirectories=""$(ProjectDir)""
|
||||
GenerateManifest="false"
|
||||
ManifestFile=""
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
LinkTimeCodeGeneration="0"
|
||||
EntryPointSymbol="main"
|
||||
TargetMachine="1"
|
||||
ErrorReporting="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Compress (Slow)|Win32"
|
||||
OutputDirectory="$(SolutionDir)bin"
|
||||
IntermediateDirectory="$(SolutionDir)obj\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/QIfist"
|
||||
Optimization="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="2"
|
||||
WholeProgramOptimization="false"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="false"
|
||||
FloatingPointModel="2"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="0"
|
||||
DebugInformationFormat="0"
|
||||
CallingConvention="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/CRINKLER /COMPMODE:SLOW /ORDERTRIES:4000 /HASHTRIES:300 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS"
|
||||
AdditionalDependencies="opengl32.lib winmm.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_$(ConfigurationName).exe"
|
||||
AdditionalLibraryDirectories=""$(ProjectDir)""
|
||||
GenerateManifest="false"
|
||||
ManifestFile=""
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="2"
|
||||
LinkTimeCodeGeneration="0"
|
||||
EntryPointSymbol="main"
|
||||
TargetMachine="1"
|
||||
ErrorReporting="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Shaders.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\synth.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\glext.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\release.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
AdditionalDependencies=""
|
||||
Outputs=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Compress (Slow)|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description=""
|
||||
CommandLine=""
|
||||
AdditionalDependencies=""
|
||||
Outputs=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Shaders.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\small.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\synth.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\4klang.obj"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\generic.vs"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mark.fs"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
232
ev16-4k/bp4k.vcxproj
Normal file
232
ev16-4k/bp4k.vcxproj
Normal file
@@ -0,0 +1,232 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Compress (Slow)|Win32">
|
||||
<Configuration>Compress (Slow)</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{213903DE-E40A-4D23-9310-E520AC2B412E}</ProjectGuid>
|
||||
<RootNamespace>bp4k</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(ProjectName)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)_$(Configuration)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(ProjectName)_$(Configuration)\</IntDir>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<TargetName>$(ProjectName)_$(Configuration)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'">
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(ProjectName)_$(Configuration)\</IntDir>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<TargetName>$(ProjectName)_$(Configuration)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName)_$(Configuration).exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>rem minify\shader_minifier.exe "mark.fs_0" -o mark_0.h -v --no-renaming
|
||||
rem minify\shader_minifier.exe "mark.fs_1" -o mark_1.h -v --no-renaming
|
||||
rem minify\shader_minifier.exe "mark.fs_2" -o mark_2.h -v --no-renaming
|
||||
rem minify\shader_minifier.exe "mark.fs_0" -o mark_small.h -v
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling />
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<AdditionalOptions>/QIfist %(AdditionalOptions)</AdditionalOptions>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;libcmt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName)_$(Configuration).exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ManifestFile />
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<LinkTimeCodeGeneration />
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<LinkErrorReporting />
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command />
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader />
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<StringPooling>true</StringPooling>
|
||||
<AdditionalOptions>/QIfist %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(ProjectName)_$(Configuration).exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(ProjectDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<ManifestFile />
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<LinkTimeCodeGeneration />
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<LinkErrorReporting />
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:SLOW /ORDERTRIES:4000 /HASHTRIES:300 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.compress.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main_rel.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Shaders.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="4klang.h" />
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="mark_small.h" />
|
||||
<ClInclude Include="Shaders.h" />
|
||||
<ClInclude Include="synth.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="4klang.asm">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Compress (Slow)|Win32'">4klang.inc</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4klang.inc</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4klang.inc</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
<None Include="4klang.inc" />
|
||||
<None Include="generic.vs">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="mark.fs" />
|
||||
<None Include="mark.fs_0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Object Include="4klang.obj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
64
ev16-4k/bp4k.vcxproj.filters
Normal file
64
ev16-4k/bp4k.vcxproj.filters
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Shaders.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main_rel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.compress.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glext.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Shaders.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="synth.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="4klang.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="mark_small.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="generic.vs" />
|
||||
<None Include="mark.fs" />
|
||||
<None Include="mark.fs_0" />
|
||||
<None Include="4klang.inc">
|
||||
<Filter>Header Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="4klang.asm">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Object Include="4klang.obj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
6
ev16-4k/bp4k.vcxproj.user
Normal file
6
ev16-4k/bp4k.vcxproj.user
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ShowAllFiles>false</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
2
ev16-4k/build.bat
Normal file
2
ev16-4k/build.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
cl /c /GS- /Qpar- /analyze- /W0 /Gy- /Zc:wchar_t /Gm- /O1 /Ob2 /Fd"obj/party/vc140.pdb" /fp:fast /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "SCREENWIDTH"=%1 /D "SCREENHEIGHT"=%2 /errorReport:prompt /WX- /Zc:forScope /GR- /arch:IA32 /Gz /Oy /Oi /MT /Fa"obj/party/" /nologo /Fo"obj/party/" /Os /Fp"obj/party/intro.pch" main.compress.cpp
|
||||
link /OUT:"bin/party/bf-detached_%1x%2.exe" "opengl32.lib" "winmm.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "obj/party/main.compress.obj" "4klang.obj" /ENTRY:"main" /SUBSYSTEM:WINDOWS /CRINKLER /COMPMODE:FAST /REPORT:report.html /RANGE:opengl32
|
||||
58
ev16-4k/buildall.bat
Normal file
58
ev16-4k/buildall.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
|
||||
mkdir bin\party
|
||||
mkdir obj\party
|
||||
|
||||
REM 16:9
|
||||
call build 1024 576
|
||||
call build 1280 720
|
||||
call build 1366 768
|
||||
call build 1600 900
|
||||
call build 1920 1080
|
||||
call build 2048 1152
|
||||
call build 2560 1440
|
||||
call build 3200 1800
|
||||
call build 3840 2160
|
||||
call build 4096 2304
|
||||
call build 7680 4320
|
||||
call build 8192 4608
|
||||
|
||||
REM 16:10
|
||||
call build 1024 640
|
||||
call build 1152 720
|
||||
call build 1280 800
|
||||
call build 1440 900
|
||||
call build 1680 1050
|
||||
call build 1920 1200
|
||||
call build 2048 1280
|
||||
call build 2304 1440
|
||||
call build 2560 1600
|
||||
call build 2880 1800
|
||||
call build 3840 2400
|
||||
call build 5120 3200
|
||||
call build 7680 4800
|
||||
|
||||
REM 4:3
|
||||
call build 640 480
|
||||
call build 800 600
|
||||
call build 1024 768
|
||||
call build 1152 864
|
||||
call build 1280 960
|
||||
call build 1400 1050
|
||||
call build 1440 1080
|
||||
call build 1600 1200
|
||||
call build 1792 1344
|
||||
call build 1856 1392
|
||||
call build 1920 1440
|
||||
call build 2560 1920
|
||||
call build 2800 2100
|
||||
call build 3200 2400
|
||||
call build 4096 3072
|
||||
call build 6400 4800
|
||||
|
||||
REM 5:4
|
||||
call build 1280 1024
|
||||
call build 1600 1280
|
||||
call build 1800 1440
|
||||
call build 2560 2048
|
||||
call build 5120 4096
|
||||
1
ev16-4k/do_minify.bat
Normal file
1
ev16-4k/do_minify.bat
Normal file
@@ -0,0 +1 @@
|
||||
shader_minifier.exe "mark.fs_0" -o mark_small.h -v
|
||||
25
ev16-4k/evk16_4k.sln
Normal file
25
ev16-4k/evk16_4k.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bp4k", "bp4k.vcxproj", "{213903DE-E40A-4D23-9310-E520AC2B412E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Compress (Slow)|Win32 = Compress (Slow)|Win32
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{213903DE-E40A-4D23-9310-E520AC2B412E}.Compress (Slow)|Win32.ActiveCfg = Compress (Slow)|Win32
|
||||
{213903DE-E40A-4D23-9310-E520AC2B412E}.Compress (Slow)|Win32.Build.0 = Compress (Slow)|Win32
|
||||
{213903DE-E40A-4D23-9310-E520AC2B412E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{213903DE-E40A-4D23-9310-E520AC2B412E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{213903DE-E40A-4D23-9310-E520AC2B412E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{213903DE-E40A-4D23-9310-E520AC2B412E}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
9
ev16-4k/generic.vs
Normal file
9
ev16-4k/generic.vs
Normal file
@@ -0,0 +1,9 @@
|
||||
varying vec4 Y;
|
||||
varying vec2 Z;
|
||||
|
||||
void main()
|
||||
{
|
||||
Y = gl_Color;
|
||||
Z = (gl_Vertex.xy*vec2(1.6,1.0))*0.5+0.5;
|
||||
gl_Position = gl_Vertex;
|
||||
}
|
||||
13146
ev16-4k/glext.h
Normal file
13146
ev16-4k/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
364
ev16-4k/intro2k15.vcxproj
Normal file
364
ev16-4k/intro2k15.vcxproj
Normal file
@@ -0,0 +1,364 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Compress (slow)|Win32">
|
||||
<Configuration>Compress (slow)</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Compress (slow)|x64">
|
||||
<Configuration>Compress (slow)</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Video|Win32">
|
||||
<Configuration>Video</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Video|x64">
|
||||
<Configuration>Video</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{DE5F7702-06F1-44F7-8823-87A60E4990BE}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>intro2k15</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<ExecutablePath>$(SolutionDir);$(ExecutablePath)</ExecutablePath>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<ExecutablePath>$(SolutionDir);$(ExecutablePath)</ExecutablePath>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;glu32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<ProfileGuidedDatabase />
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<AdditionalDependencies>winmm.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<ProfileGuidedDatabase />
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<AdditionalDependencies>winmm.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="4klang.h" />
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="mark_small.h" />
|
||||
<ClInclude Include="Shaders.h" />
|
||||
<ClInclude Include="synth.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="4klang.asm">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Video|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling 4klang...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4klang.obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4klang.inc</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">4klang.inc</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling 4klang...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4klang.obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4klang.inc</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">4klang.inc</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Compiling 4klang...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Video|x64'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4klang.obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Video|x64'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4klang.inc</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Video|x64'">4klang.inc</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling 4klang...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4klang.obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4klang.inc</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">4klang.inc</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
<None Include="4klang.inc" />
|
||||
<None Include="generic.vs" />
|
||||
<None Include="mark.fs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Object Include="4klang.obj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Shaders.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
57
ev16-4k/intro2k15.vcxproj.filters
Normal file
57
ev16-4k/intro2k15.vcxproj.filters
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="4klang.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="glext.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="mark_small.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Shaders.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="synth.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="4klang.inc">
|
||||
<Filter>Header Files</Filter>
|
||||
</None>
|
||||
<None Include="generic.vs" />
|
||||
<None Include="mark.fs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Object Include="4klang.obj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Shaders.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="4klang.asm">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
6
ev16-4k/intro2k15.vcxproj.user
Normal file
6
ev16-4k/intro2k15.vcxproj.user
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ShowAllFiles>true</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
BIN
ev16-4k/link.exe
Normal file
BIN
ev16-4k/link.exe
Normal file
Binary file not shown.
272
ev16-4k/main.compress.cpp
Normal file
272
ev16-4k/main.compress.cpp
Normal file
@@ -0,0 +1,272 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "synth.h"
|
||||
#include <GL/gl.h>
|
||||
#include "glext.h"
|
||||
#include "mark_small.h"
|
||||
|
||||
#ifndef SCREENWIDTH
|
||||
//#define SCREENWIDTH 1280
|
||||
#define SCREENWIDTH 320
|
||||
#endif
|
||||
|
||||
#ifndef SCREENHEIGHT
|
||||
//#define SCREENHEIGHT 720
|
||||
#define SCREENHEIGHT 180
|
||||
#endif
|
||||
|
||||
#ifndef ASPECTOFFSET
|
||||
#define ASPECTOFFSET 0.375f
|
||||
#endif
|
||||
|
||||
#define shaderCountOffset 14
|
||||
|
||||
#define ATOM_EDIT 0xC018
|
||||
#define ATOM_STATIC 0xC019
|
||||
|
||||
#define SCENE_LENGTH (SAMPLES_PER_TICK * 64)
|
||||
|
||||
#pragma data_seg(".aspectOffset")
|
||||
static const float gfAspectOffset = ASPECTOFFSET;
|
||||
|
||||
#pragma data_seg(".scebeLength")
|
||||
static const int giSceneLength = SCENE_LENGTH;
|
||||
|
||||
//#define PFD_HACK
|
||||
#define SHADER_WARMUP
|
||||
//#define WINDOWED
|
||||
#define START_BLACK
|
||||
|
||||
#pragma data_seg(".Shader0")
|
||||
#include "mark_small.h"
|
||||
|
||||
struct FAKEDEVMODE
|
||||
{
|
||||
BYTE _a[36];
|
||||
DWORD dmSize;
|
||||
DWORD dmFields;
|
||||
struct
|
||||
{
|
||||
BYTE _b[4];
|
||||
DWORD pfdFlags;
|
||||
} pfd;
|
||||
BYTE _c[56];
|
||||
DWORD width;
|
||||
DWORD height;
|
||||
BYTE _d[8];
|
||||
};
|
||||
|
||||
#pragma data_seg("fcw")
|
||||
static WORD fcw = 0x0E7f;
|
||||
|
||||
#pragma data_seg(".devmode")
|
||||
static FAKEDEVMODE devmode = {
|
||||
"", sizeof(devmode), DM_PELSWIDTH | DM_PELSHEIGHT, "", PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL, "", SCREENWIDTH, SCREENHEIGHT, ""
|
||||
};
|
||||
|
||||
#pragma bss_seg(".mainbss")
|
||||
static PFNGLCREATESHADERPROGRAMEXTPROC glCreateShaderProgramEXT;
|
||||
static PFNGLUSEPROGRAMPROC glUseProgram;
|
||||
static PFNGLUNIFORM3FPROC glUniform3f;
|
||||
|
||||
#pragma data_seg(".fltused")
|
||||
int _fltused = 1;
|
||||
|
||||
#pragma data_seg(".glCreateShaderProgramEXT")
|
||||
static const char* sglCreateShaderProgramEXT = "glCreateShaderProgramEXT";
|
||||
|
||||
#pragma data_seg(".glUseProgram")
|
||||
static const char* sglUseProgram = "glUseProgram";
|
||||
|
||||
#pragma data_seg(".glUniform3f")
|
||||
static const char* sglUniform3f = "glUniform3f";
|
||||
|
||||
#pragma code_seg(".main")
|
||||
void _cdecl main()
|
||||
{
|
||||
_asm
|
||||
{
|
||||
fldcw [fcw]
|
||||
|
||||
xor esi, esi
|
||||
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
|
||||
#ifndef WINDOWED
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push WS_POPUP | WS_VISIBLE | WS_MAXIMIZE
|
||||
push esi
|
||||
push ATOM_STATIC
|
||||
push esi
|
||||
push CDS_FULLSCREEN
|
||||
push offset devmode
|
||||
push esi
|
||||
push esi
|
||||
push offset lpSoundBuffer
|
||||
push _4klang_render
|
||||
push esi
|
||||
push esi
|
||||
call CreateThread
|
||||
call ChangeDisplaySettings
|
||||
call CreateWindowExA
|
||||
#else
|
||||
push SCREENHEIGHT
|
||||
push SCREENWIDTH
|
||||
push esi
|
||||
push esi
|
||||
push WS_EX_APPWINDOW | WS_VISIBLE | WS_SYSMENU
|
||||
push esi
|
||||
push ATOM_STATIC
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push offset lpSoundBuffer
|
||||
push _4klang_render
|
||||
push esi
|
||||
push esi
|
||||
call CreateThread
|
||||
call CreateWindowExA
|
||||
#endif
|
||||
|
||||
push eax
|
||||
call GetDC
|
||||
mov edi, eax
|
||||
|
||||
push esi
|
||||
#ifdef START_BLACK
|
||||
push edi
|
||||
#endif
|
||||
push edi
|
||||
#ifdef PFD_HACK
|
||||
push esi
|
||||
push 8
|
||||
#else
|
||||
push esi
|
||||
push offset devmode.pfd
|
||||
push edi
|
||||
call ChoosePixelFormat
|
||||
push eax
|
||||
#endif
|
||||
push edi
|
||||
call SetPixelFormat
|
||||
call wglCreateContext
|
||||
push eax
|
||||
push edi
|
||||
call wglMakeCurrent
|
||||
#ifdef START_BLACK
|
||||
call SwapBuffers
|
||||
#endif
|
||||
call ShowCursor
|
||||
|
||||
xor ebx, ebx
|
||||
|
||||
shaderwarmup :
|
||||
#ifdef SHADER_WARMUP
|
||||
push 1
|
||||
push 1
|
||||
push - 1
|
||||
push - 1
|
||||
#endif
|
||||
push offset mark_fs_0
|
||||
push GL_FRAGMENT_SHADER
|
||||
push sglCreateShaderProgramEXT
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
#ifdef SHADER_WARMUP
|
||||
push eax
|
||||
push sglUseProgram
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
#endif
|
||||
inc byte ptr[mark_fs_0 + shaderCountOffset]
|
||||
|
||||
cmp ebx, 9
|
||||
jnz skip
|
||||
mov byte ptr[mark_fs_0 + shaderCountOffset], 'A'
|
||||
skip:
|
||||
#ifdef SHADER_WARMUP
|
||||
push gfAspectOffset
|
||||
push dword ptr[devmode.height]
|
||||
fild dword ptr[esp]
|
||||
fstp dword ptr[esp]
|
||||
push ebx
|
||||
fild dword ptr[esp]
|
||||
fstp dword ptr[esp]
|
||||
push esi
|
||||
push sglUniform3f
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
call glRecti
|
||||
#endif
|
||||
inc ebx
|
||||
cmp ebx, 12
|
||||
jnz shaderwarmup
|
||||
|
||||
push 0x20
|
||||
push offset WaveHDR
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push offset WaveFMT
|
||||
push -1
|
||||
push offset hWaveOut
|
||||
call waveOutOpen
|
||||
push [hWaveOut]
|
||||
call waveOutWrite
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
_asm
|
||||
{
|
||||
push 0xC
|
||||
push offset MMTime
|
||||
push [hWaveOut]
|
||||
call waveOutGetPosition
|
||||
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push edi
|
||||
push 1
|
||||
push 1
|
||||
push -1
|
||||
push -1
|
||||
push gfAspectOffset
|
||||
push dword ptr[devmode.height]
|
||||
fild dword ptr[esp]
|
||||
fstp dword ptr[esp]
|
||||
push dword ptr[MMTime.u.sample]
|
||||
fild dword ptr[esp]
|
||||
fild giSceneLength
|
||||
fdiv
|
||||
fst dword ptr[esp]
|
||||
push esi
|
||||
push esi
|
||||
fistp dword ptr[esp]
|
||||
pop eax
|
||||
inc eax
|
||||
push eax
|
||||
push sglUseProgram
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
|
||||
push sglUniform3f
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
call glRecti
|
||||
call SwapBuffers
|
||||
call PeekMessage
|
||||
}
|
||||
} while (MMTime.u.sample < MAX_SAMPLES && !GetAsyncKeyState(VK_ESCAPE));
|
||||
|
||||
ExitProcess(0);
|
||||
}
|
||||
424
ev16-4k/main.cpp
Normal file
424
ev16-4k/main.cpp
Normal file
@@ -0,0 +1,424 @@
|
||||
//#define NOMUSICTIMING
|
||||
#define MULTISHADER
|
||||
|
||||
#include <time.h>
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
#include "Shaders.h"
|
||||
#include "synth.h"
|
||||
#include "4klang.h"
|
||||
|
||||
#define HALF_FAC 2
|
||||
static const int gi_ScreenWidth = 1280/HALF_FAC;
|
||||
static const int gi_ScreenHeight = 720/HALF_FAC;
|
||||
static const char* glUniform4f = "glUniform4f";
|
||||
|
||||
HANDLE gh_ShaderCompileEvent;
|
||||
static char** gs_LastShader_;
|
||||
static __time64_t gi_ShaderChangedDate;
|
||||
static unsigned int gi_ShaderProgram;
|
||||
static unsigned int gi_LastShaderProgram;
|
||||
static const char* gs_VertexShader = "generic.vs";
|
||||
static const char* gs_ShaderFile = "mark.fs";
|
||||
|
||||
static const PIXELFORMATDESCRIPTOR pfd={
|
||||
0, 1, PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, PFD_TYPE_RGBA, 32, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 8
|
||||
};
|
||||
|
||||
static DEVMODE dmScreenSettings={
|
||||
0,0,0,sizeof(dmScreenSettings),0,DM_PELSWIDTH|DM_PELSHEIGHT,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,gi_ScreenWidth,gi_ScreenHeight
|
||||
};
|
||||
|
||||
__forceinline unsigned int compileShader(const char* vsh, const char* fsh)
|
||||
{
|
||||
GLuint s,p;
|
||||
p = ((PFNGLCREATEPROGRAMPROC)wglGetProcAddress("glCreateProgram"))();
|
||||
s = ((PFNGLCREATESHADERPROC)(wglGetProcAddress("glCreateShader")))(GL_VERTEX_SHADER);
|
||||
((PFNGLSHADERSOURCEPROC)wglGetProcAddress("glShaderSource")) (s, 1, &vsh, NULL);
|
||||
((PFNGLCOMPILESHADERPROC)wglGetProcAddress("glCompileShader"))(s);
|
||||
((PFNGLATTACHSHADERPROC)wglGetProcAddress("glAttachShader")) (p,s);
|
||||
s = ((PFNGLCREATESHADERPROC)wglGetProcAddress("glCreateShader"))(GL_FRAGMENT_SHADER);
|
||||
((PFNGLSHADERSOURCEPROC)wglGetProcAddress("glShaderSource")) (s, 1, &fsh, NULL);
|
||||
((PFNGLCOMPILESHADERPROC)wglGetProcAddress("glCompileShader"))(s);
|
||||
((PFNGLATTACHSHADERPROC)wglGetProcAddress("glAttachShader")) (p,s);
|
||||
((PFNGLLINKPROGRAMPROC)wglGetProcAddress("glLinkProgram"))(p);
|
||||
#ifndef MULTISHADER
|
||||
((PFNGLUSEPROGRAMPROC)wglGetProcAddress("glUseProgram"))(p);
|
||||
#endif
|
||||
return p;
|
||||
}
|
||||
|
||||
#define CHECK_DEBUG_OUTPUT(shader) \
|
||||
{\
|
||||
GLint success = 0;\
|
||||
glGetShaderiv(shader, GL_COMPILE_STATUS, &success);\
|
||||
if (!success)\
|
||||
{\
|
||||
GLchar infoLog[16384];\
|
||||
glGetShaderInfoLog(shader, 16384, NULL, infoLog);\
|
||||
OutputDebugString(infoLog);\
|
||||
}\
|
||||
}
|
||||
|
||||
DWORD WINAPI filemon(void* args)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
_finddata_t fdata;
|
||||
long hfile = _findfirst(gs_ShaderFile, &fdata);
|
||||
if (hfile != -1)
|
||||
{
|
||||
if (fdata.time_write != gi_ShaderChangedDate)
|
||||
{
|
||||
gi_ShaderChangedDate = fdata.time_write;
|
||||
::SetEvent(gh_ShaderCompileEvent);
|
||||
std::cout << "Shader loaded." << std::endl;
|
||||
}
|
||||
_findclose(hfile);
|
||||
}
|
||||
::Sleep(100);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <cmath>
|
||||
|
||||
float g_DebugCamPos[ 3 ]= {0,2.0f,-5.0f};
|
||||
float g_DebugCamRot[ 2 ]= {0,0};
|
||||
|
||||
bool g_ShaderDebug= true;
|
||||
int g_ShaderID= 0;
|
||||
int g_SceneID= 0;
|
||||
int g_MaxSceneID= 16;
|
||||
float g_fSqrAnimFac= 0.0f;
|
||||
|
||||
float g_fSpeedFac= 8.0f;
|
||||
|
||||
bool g_bForceCompile= true;
|
||||
|
||||
void MoveCam( float& fCurTime )
|
||||
{
|
||||
float fSpeed= 0.25f;
|
||||
|
||||
bool bShift= GetAsyncKeyState( VK_SHIFT ) || GetAsyncKeyState( VK_MBUTTON ) || GetAsyncKeyState( VK_RBUTTON );
|
||||
bool bStrg= GetAsyncKeyState( VK_CONTROL ) != 0;
|
||||
float a= g_DebugCamRot[ 0 ];
|
||||
float b= g_DebugCamRot[ 1 ];
|
||||
float g_Forward[ 3 ]= {sinf( a )*cosf(b),-sinf(b), cosf( a )*cosf(b)};
|
||||
float g_Right[ 3 ]= {cosf( a ),0, -sinf( a )};
|
||||
if( bShift )
|
||||
{
|
||||
if(bStrg)
|
||||
{
|
||||
fSpeed *= 4.0f;
|
||||
}
|
||||
|
||||
if( GetAsyncKeyState( VK_HOME ) && bStrg)
|
||||
{
|
||||
g_DebugCamPos[ 0 ]= 0.0f;
|
||||
g_DebugCamPos[ 1 ]= 2.0f;
|
||||
g_DebugCamPos[ 2 ]= -5.0f;
|
||||
|
||||
g_DebugCamRot[ 0 ]= 0.0f;
|
||||
g_DebugCamRot[ 1 ]= 0.0f;
|
||||
}
|
||||
|
||||
if( GetAsyncKeyState( 'W' ) )
|
||||
{
|
||||
g_DebugCamPos[ 0 ]+= fSpeed * g_Forward[ 0 ];
|
||||
g_DebugCamPos[ 1 ]+= fSpeed * g_Forward[ 1 ];
|
||||
g_DebugCamPos[ 2 ]+= fSpeed * g_Forward[ 2 ];
|
||||
}
|
||||
if( GetAsyncKeyState( 'S' ) )
|
||||
{
|
||||
g_DebugCamPos[ 0 ]-= fSpeed * g_Forward[ 0 ];
|
||||
g_DebugCamPos[ 1 ]-= fSpeed * g_Forward[ 1 ];
|
||||
g_DebugCamPos[ 2 ]-= fSpeed * g_Forward[ 2 ];
|
||||
}
|
||||
if( GetAsyncKeyState( 'A' ) )
|
||||
{
|
||||
g_DebugCamPos[ 0 ]-= fSpeed * g_Right[ 0 ];
|
||||
g_DebugCamPos[ 1 ]-= fSpeed * g_Right[ 1 ];
|
||||
g_DebugCamPos[ 2 ]-= fSpeed * g_Right[ 2 ];
|
||||
}
|
||||
if( GetAsyncKeyState( 'D' ) )
|
||||
{
|
||||
g_DebugCamPos[ 0 ]+= fSpeed * g_Right[ 0 ];
|
||||
g_DebugCamPos[ 1 ]+= fSpeed * g_Right[ 1 ];
|
||||
g_DebugCamPos[ 2 ]+= fSpeed * g_Right[ 2 ];
|
||||
}
|
||||
if( GetAsyncKeyState( 'F' ) )
|
||||
{
|
||||
g_DebugCamPos[ 1 ]+= fSpeed;
|
||||
}
|
||||
if( GetAsyncKeyState( 'V' ) )
|
||||
{
|
||||
g_DebugCamPos[ 1 ]-= fSpeed;
|
||||
}
|
||||
|
||||
if( bStrg )
|
||||
{
|
||||
if( ( GetAsyncKeyState( VK_F2 ) & 1 ) != 0)
|
||||
{
|
||||
g_ShaderDebug= !g_ShaderDebug;
|
||||
g_bForceCompile= true;
|
||||
}
|
||||
if( ( GetAsyncKeyState( VK_F3 ) & 1 ) != 0)
|
||||
{
|
||||
g_ShaderID= (g_ShaderID + MAX_SHADER_ID - 1 ) % MAX_SHADER_ID;
|
||||
g_bForceCompile= true;
|
||||
}
|
||||
if( ( GetAsyncKeyState( VK_F4 ) & 1 )!= 0)
|
||||
{
|
||||
g_ShaderID= (g_ShaderID + MAX_SHADER_ID + 1 ) % MAX_SHADER_ID;
|
||||
g_bForceCompile= true;
|
||||
}
|
||||
if( ( GetAsyncKeyState( VK_F7 ) & 1 ) != 0)
|
||||
{
|
||||
g_SceneID= (g_SceneID + g_MaxSceneID - 1 ) % g_MaxSceneID;
|
||||
}
|
||||
if( ( GetAsyncKeyState( VK_F8 ) & 1 )!= 0)
|
||||
{
|
||||
g_SceneID= (g_SceneID + g_MaxSceneID + 1 ) % g_MaxSceneID;
|
||||
}
|
||||
if( ( GetAsyncKeyState( VK_F9 ) & 1 ) != 0)
|
||||
{
|
||||
g_fSqrAnimFac-= 1.0f;
|
||||
}
|
||||
if( ( GetAsyncKeyState( VK_F10 ) & 1 )!= 0)
|
||||
{
|
||||
g_fSqrAnimFac+= 1.0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ( GetAsyncKeyState( VK_F6 ) & 1 )!= 0)
|
||||
{
|
||||
fCurTime= 0.0f;
|
||||
}
|
||||
if( ( GetAsyncKeyState( VK_F7 ) & 1 )!= 0)
|
||||
{
|
||||
g_fSpeedFac*= 2.0f;
|
||||
if( g_fSpeedFac > 32.0f )
|
||||
{
|
||||
g_fSpeedFac= 32.0f;
|
||||
}
|
||||
}
|
||||
if( ( GetAsyncKeyState( VK_F8 ) & 1 ) != 0)
|
||||
{
|
||||
g_fSpeedFac/= 2.0f;
|
||||
if( g_fSpeedFac < 2.0f )
|
||||
{
|
||||
g_fSpeedFac= 2.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static POINT OldCurPos;
|
||||
POINT CurPos;
|
||||
GetCursorPos( &CurPos );
|
||||
|
||||
if( bShift )
|
||||
{
|
||||
g_DebugCamRot[ 0 ]-= 0.003f * ( OldCurPos.x - CurPos.x );
|
||||
g_DebugCamRot[ 1 ]-= 0.003f * ( OldCurPos.y - CurPos.y );
|
||||
g_DebugCamRot[ 1 ]= max( g_DebugCamRot[ 1 ], -1.56f );
|
||||
g_DebugCamRot[ 1 ]= min( g_DebugCamRot[ 1 ], 1.56f );
|
||||
}
|
||||
OldCurPos= CurPos;
|
||||
|
||||
}
|
||||
|
||||
LRESULT MessageCallback(HWND ar_Handle, UINT aw_Message, WPARAM aw_Param, LPARAM al_Param)
|
||||
{
|
||||
return DefWindowProc(ar_Handle, aw_Message, aw_Param, al_Param);
|
||||
}
|
||||
|
||||
int gCurScene= 0;
|
||||
int gCurSceneStart= 0;
|
||||
/*int g_SceneLength[]=
|
||||
{
|
||||
16, 16, 16,
|
||||
16, 16, 16,
|
||||
16, 32, 16,
|
||||
16, 16, 16,
|
||||
0x80000000
|
||||
};
|
||||
int g_SceneShader[]=
|
||||
{
|
||||
0,0,0,
|
||||
1,1,1,
|
||||
2,2,2,
|
||||
3,3,3,
|
||||
};
|
||||
float g_SceneFactor[]=
|
||||
{
|
||||
0, 0, 0,
|
||||
0, 0, 1.0f,
|
||||
0, 0, 1.0f,
|
||||
0, 1.0f, 1.0f,
|
||||
0,
|
||||
};*/
|
||||
|
||||
void _cdecl main()
|
||||
{
|
||||
//ChangeDisplaySettings (&dmScreenSettings,CDS_FULLSCREEN);
|
||||
//HDC hDC = GetDC(CreateWindow("edit", 0, WS_POPUP | WS_VISIBLE | WS_MAXIMIZE, 0, 0, 0, 0, 0, 0, 0, 0));
|
||||
//HWND hWnd = CreateWindow("MDICLIENT", "Test", WS_OVERLAPPED | WS_VISIBLE | WS_SYSMENU, 0, 0, gi_ScreenWidth, gi_ScreenHeight, 0, 0, 0, 0);
|
||||
|
||||
WNDCLASSEX wndclass;
|
||||
wndclass.cbSize = sizeof (wndclass) ;
|
||||
wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
||||
wndclass.lpfnWndProc = (WNDPROC)MessageCallback ;
|
||||
wndclass.cbClsExtra = 0 ;
|
||||
wndclass.cbWndExtra = 0 ;
|
||||
wndclass.hInstance = NULL ;
|
||||
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
|
||||
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
|
||||
wndclass.hbrBackground = (HBRUSH) GetStockObject (DKGRAY_BRUSH) ;
|
||||
wndclass.lpszMenuName = NULL;
|
||||
wndclass.lpszClassName = "Window" ;
|
||||
wndclass.hIconSm = LoadIcon (NULL, IDI_APPLICATION) ;
|
||||
|
||||
RegisterClassEx(&wndclass);
|
||||
|
||||
HWND hWnd = CreateWindow(
|
||||
"Window", /* Classname */
|
||||
"Title", /* Title Text */
|
||||
WS_EX_APPWINDOW, /* default window */
|
||||
10, /* Windows decides the position */
|
||||
30, /* where the window ends up on the screen */
|
||||
gi_ScreenWidth, /* The programs width */
|
||||
gi_ScreenHeight, /* and height in pixels */
|
||||
NULL, /* The window is a child-window to desktop */
|
||||
NULL, /* No menu */
|
||||
GetModuleHandle(NULL), //GetModuleHandle(NULL), /* Program Instance handler */
|
||||
NULL /* No Window Creation data */
|
||||
);
|
||||
|
||||
|
||||
HDC hDC = GetDC(hWnd);
|
||||
SetPixelFormat(hDC, ChoosePixelFormat(hDC, &pfd), &pfd);
|
||||
wglMakeCurrent(hDC, wglCreateContext(hDC));
|
||||
initShaders();
|
||||
gh_ShaderCompileEvent = ::CreateEvent(NULL, FALSE, FALSE, TEXT("WriteEvent"));
|
||||
SetThreadPriority((HANDLE)CreateThread(0, 0, &filemon, 0, 0, 0), THREAD_PRIORITY_BELOW_NORMAL);
|
||||
|
||||
ShowWindow (hWnd , SW_NORMAL );
|
||||
::Sleep(100);
|
||||
|
||||
if (::WaitForSingleObject(gh_ShaderCompileEvent, 0) == WAIT_OBJECT_0)
|
||||
{
|
||||
::Sleep(250);
|
||||
gi_ShaderProgram = createProgram(
|
||||
createVertexShader(gs_VertexShader),
|
||||
createFragmentShader(gs_ShaderFile, g_ShaderID, g_ShaderDebug ));
|
||||
|
||||
((PFNGLUSEPROGRAMPROC)wglGetProcAddress("glUseProgram"))(gi_ShaderProgram);
|
||||
PrintErrors();
|
||||
}
|
||||
glColor4f(0,0, (GLfloat)gi_ScreenWidth, (GLfloat)gi_ScreenHeight);
|
||||
glRectf(-1, -1, 1, 1);
|
||||
SwapBuffers(hDC);
|
||||
|
||||
LARGE_INTEGER li_OldTime = { 0 };
|
||||
|
||||
#ifdef NOMUSICTIMING
|
||||
int iStartTick= timeGetTime();
|
||||
#endif
|
||||
|
||||
float lf_Time= 0.0f;
|
||||
do
|
||||
{
|
||||
MSG msg;
|
||||
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
||||
{
|
||||
if (msg.message == WM_QUIT)
|
||||
return;
|
||||
else
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (::WaitForSingleObject(gh_ShaderCompileEvent, 0) == WAIT_OBJECT_0 || g_bForceCompile)
|
||||
{
|
||||
::Sleep(50);
|
||||
gi_ShaderProgram = createProgram(
|
||||
createVertexShader(gs_VertexShader),
|
||||
createFragmentShader(gs_ShaderFile, g_ShaderID, g_ShaderDebug));
|
||||
|
||||
((PFNGLUSEPROGRAMPROC)wglGetProcAddress("glUseProgram"))(gi_ShaderProgram);
|
||||
PrintErrors();
|
||||
|
||||
g_bForceCompile= false;
|
||||
}
|
||||
|
||||
get_Sample();
|
||||
int Sample= MMTime.u.sample - gCurSceneStart;
|
||||
int SceneEnd = 8 * SAMPLES_PER_TICK * 8;//samples per tick
|
||||
|
||||
#ifdef NOMUSICTIMING
|
||||
lf_Time = ( timeGetTime() - iStartTick ) * 0.001f / 16.0f;
|
||||
#endif
|
||||
|
||||
glLoadIdentity();
|
||||
|
||||
LARGE_INTEGER li_CurrentTime, li_CurrentFrequency;
|
||||
QueryPerformanceCounter(&li_CurrentTime);
|
||||
QueryPerformanceFrequency(&li_CurrentFrequency);
|
||||
//lf_Time = (float)li_CurrentTime.QuadPart / (float)li_CurrentFrequency.QuadPart;
|
||||
float lf_DiffTime = (float)(li_CurrentTime.QuadPart - li_OldTime.QuadPart) / (float)li_CurrentFrequency.QuadPart;
|
||||
char windowText[255];
|
||||
sprintf_s(
|
||||
windowText,
|
||||
"Shader: %d Scene: %d AnimFac: %2.2f FPS: %.2f, Render time: %.4fms",
|
||||
g_ShaderID,
|
||||
g_SceneID,
|
||||
g_fSqrAnimFac,
|
||||
1.0f / lf_DiffTime,
|
||||
lf_DiffTime );
|
||||
::SetWindowTextA(hWnd, windowText);
|
||||
|
||||
li_OldTime = li_CurrentTime;
|
||||
|
||||
lf_Time+= lf_DiffTime * 145.0f / 60.0f / g_fSpeedFac;
|
||||
if( lf_Time > 1.0f )
|
||||
{
|
||||
lf_Time= 0.0f;
|
||||
if (g_fSqrAnimFac < 0.0)
|
||||
{
|
||||
g_SceneID = (g_SceneID + 1) % 16;
|
||||
}
|
||||
}
|
||||
if( lf_Time < 0.0f )
|
||||
{
|
||||
lf_Time = 0.0f;
|
||||
}
|
||||
if (g_fSqrAnimFac == 0)
|
||||
{
|
||||
lf_Time = 0.0f;
|
||||
}
|
||||
((PFNGLUNIFORM4FPROC)wglGetProcAddress(glUniform4f))(0, (float)g_SceneID + lf_Time, (GLfloat)gi_ScreenHeight, (GLfloat)0.375f, 0.0f);
|
||||
MoveCam( lf_Time );
|
||||
|
||||
float fDebugData[ 16 ];
|
||||
fDebugData[ 0 ]= g_DebugCamPos[ 0 ];
|
||||
fDebugData[ 1 ]= g_DebugCamPos[ 1 ];
|
||||
fDebugData[ 2 ]= g_DebugCamPos[ 2 ];
|
||||
fDebugData[ 4 ]= g_DebugCamRot[ 0 ];
|
||||
fDebugData[ 5 ]= g_DebugCamRot[ 1 ];
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadMatrixf((GLfloat*)&fDebugData);
|
||||
|
||||
glRects(-1, -1, 1, 1);
|
||||
SwapBuffers(hDC);
|
||||
|
||||
}
|
||||
while ( !GetAsyncKeyState(VK_ESCAPE) );
|
||||
ExitProcess(0);
|
||||
}
|
||||
218
ev16-4k/main.video.cpp
Normal file
218
ev16-4k/main.video.cpp
Normal file
@@ -0,0 +1,218 @@
|
||||
// INCLUDES
|
||||
//---------
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "synth.h"
|
||||
#include <GL/gl.h>
|
||||
#include "glext.h"
|
||||
#include "mark_small.h"
|
||||
#include <vfw.h>
|
||||
|
||||
// CONFIG
|
||||
//-------
|
||||
#define FPS 60
|
||||
#define MOTION_BLUR 2
|
||||
#define SCREENWIDTH 1920
|
||||
#define SCREENHEIGHT 1080
|
||||
#define ASPECTOFFSET ((float(SCREENWIDTH) / float(SCREENHEIGHT) - 1.0f) * 0.5f)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PAVISTREAM m_ps;
|
||||
PAVISTREAM m_psCompressed;
|
||||
PAVISTREAM m_psAudio;
|
||||
AVISTREAMINFO m_strhdr;
|
||||
AVICOMPRESSOPTIONS m_opts;
|
||||
PAVIFILE m_pfile;
|
||||
BITMAPINFOHEADER m_alpbi;
|
||||
} AVIWRITER;
|
||||
|
||||
static AVIWRITER avi;
|
||||
static int frame = 0;
|
||||
static GLushort tempBuffer[3 * SCREENWIDTH * SCREENHEIGHT];
|
||||
static GLubyte data[3 * SCREENWIDTH * SCREENHEIGHT];
|
||||
|
||||
struct FAKEPFD
|
||||
{
|
||||
WORD nSize;
|
||||
WORD nVersion;
|
||||
DWORD dwFlags;
|
||||
// Snip
|
||||
};
|
||||
|
||||
struct FAKEDEVMODE
|
||||
{
|
||||
BYTE dmDeviceName[CCHDEVICENAME];
|
||||
WORD dmSpecVersion;
|
||||
WORD dmDriverVersion;
|
||||
WORD dmSize;
|
||||
WORD dmDriverExtra;
|
||||
DWORD dmFields;
|
||||
union {
|
||||
/* printer only fields */
|
||||
struct {
|
||||
short dmOrientation;
|
||||
short dmPaperSize;
|
||||
short dmPaperLength;
|
||||
short dmPaperWidth;
|
||||
short dmScale;
|
||||
short dmCopies;
|
||||
short dmDefaultSource;
|
||||
short dmPrintQuality;
|
||||
};
|
||||
FAKEPFD pfd;
|
||||
};
|
||||
short dmColor;
|
||||
short dmDuplex;
|
||||
short dmYResolution;
|
||||
short dmTTOption;
|
||||
short dmCollate;
|
||||
BYTE dmFormName[CCHFORMNAME];
|
||||
WORD dmLogPixels;
|
||||
DWORD dmBitsPerPel;
|
||||
DWORD dmPelsWidth;
|
||||
DWORD dmPelsHeight;
|
||||
union {
|
||||
DWORD dmDisplayFlags;
|
||||
DWORD dmNup;
|
||||
};
|
||||
DWORD dmDisplayFrequency;
|
||||
};
|
||||
|
||||
static PFNGLCREATESHADERPROGRAMEXTPROC glCreateShaderProgramEXT;
|
||||
static PFNGLUSEPROGRAMPROC glUseProgram;
|
||||
static PFNGLUNIFORM4FPROC glUniform4f;
|
||||
|
||||
static FAKEDEVMODE devmode = {
|
||||
"", 0, 0, sizeof(devmode), 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0, 0, PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0
|
||||
};
|
||||
|
||||
static const char* sglCreateShaderProgramEXT = "glCreateShaderProgramEXT";
|
||||
static const char* sglUseProgram = "glUseProgram";
|
||||
static const char* sglUniform4f = "glUniform4f";
|
||||
|
||||
#define shaderCountOffset 14
|
||||
|
||||
#define ATOM_EDIT 0xC018
|
||||
#define ATOM_STATIC 0xC019
|
||||
|
||||
#define SCENE_LENGTH (SAMPLES_PER_TICK * 128)
|
||||
|
||||
void _cdecl main()
|
||||
{
|
||||
InitSound();
|
||||
HWND hWnd = CreateWindowExA(0, (LPCSTR)ATOM_STATIC, 0, WS_VISIBLE | WS_SYSMENU, 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0, 0);
|
||||
HDC hDC = GetDC(hWnd);
|
||||
|
||||
//SetPixelFormat(hDC, ChoosePixelFormat(hDC, (const PIXELFORMATDESCRIPTOR*)&devmode.pfd), 0);
|
||||
// if size is a problem, try this:
|
||||
SetPixelFormat(hDC, 8, 0);
|
||||
wglMakeCurrent(hDC, wglCreateContext(hDC));
|
||||
|
||||
glCreateShaderProgramEXT = (PFNGLCREATESHADERPROGRAMEXTPROC)wglGetProcAddress(sglCreateShaderProgramEXT);
|
||||
glUseProgram = (PFNGLUSEPROGRAMPROC)wglGetProcAddress(sglUseProgram);
|
||||
glUniform4f = (PFNGLUNIFORM4FPROC)wglGetProcAddress(sglUniform4f);
|
||||
|
||||
for (int i = 0; i < 12; ++i)
|
||||
{
|
||||
glUseProgram(glCreateShaderProgramEXT(GL_FRAGMENT_SHADER, mark_fs_0));
|
||||
mark_fs_0[shaderCountOffset]++;
|
||||
if (i == 9)
|
||||
{
|
||||
mark_fs_0[shaderCountOffset] = 'A';
|
||||
}
|
||||
glUniform4f(0, i, SCREENHEIGHT, ASPECTOFFSET, 0.0f);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
}
|
||||
|
||||
AVIFileInit();
|
||||
AVIFileOpen(&avi.m_pfile, "intro.avi", OF_WRITE | OF_CREATE, NULL);
|
||||
|
||||
memset(&avi.m_strhdr, 0, sizeof(avi.m_strhdr));
|
||||
avi.m_strhdr.fccType = streamtypeVIDEO;
|
||||
avi.m_strhdr.fccHandler = 0;
|
||||
avi.m_strhdr.dwScale = 1;
|
||||
avi.m_strhdr.dwRate = FPS;
|
||||
avi.m_strhdr.dwSuggestedBufferSize = 0;// 3 * SCREENWIDTH * SCREENHEIGHT;
|
||||
SetRect(&avi.m_strhdr.rcFrame, 0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
AVIFileCreateStream(avi.m_pfile, &avi.m_ps, &avi.m_strhdr);
|
||||
|
||||
memset(&avi.m_strhdr, 0, sizeof(avi.m_strhdr));
|
||||
avi.m_strhdr.fccType = streamtypeAUDIO;
|
||||
avi.m_strhdr.dwScale = WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwRate = WaveFMT.nSamplesPerSec * WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwSampleSize = WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwQuality = (DWORD)-1;
|
||||
SetRect(&avi.m_strhdr.rcFrame, 0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
AVIFileCreateStream(avi.m_pfile, &avi.m_psAudio, &avi.m_strhdr);
|
||||
AVIStreamSetFormat(avi.m_psAudio, 0, &WaveFMT, sizeof(WAVEFORMATEX));
|
||||
|
||||
auto ops = &avi.m_opts;
|
||||
if (AVISaveOptions(hWnd, 0, 1, &avi.m_ps, &ops) == FALSE)
|
||||
{
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
AVIMakeCompressedStream(&avi.m_psCompressed, avi.m_ps, &avi.m_opts, NULL);
|
||||
|
||||
memset(&avi.m_alpbi, 0, sizeof(avi.m_alpbi));
|
||||
avi.m_alpbi.biSize = sizeof(avi.m_alpbi);
|
||||
avi.m_alpbi.biWidth = SCREENWIDTH;
|
||||
avi.m_alpbi.biHeight = SCREENHEIGHT;
|
||||
avi.m_alpbi.biPlanes = 1;
|
||||
avi.m_alpbi.biBitCount = 24;
|
||||
avi.m_alpbi.biCompression = BI_RGB;
|
||||
|
||||
AVIStreamSetFormat(avi.m_psCompressed, 0, &avi.m_alpbi, sizeof(avi.m_alpbi));
|
||||
|
||||
int sample = 0;
|
||||
do
|
||||
{
|
||||
sample = ((float)frame / (float)(FPS * MOTION_BLUR)) * SAMPLE_RATE;
|
||||
float fTime = (float)sample / SCENE_LENGTH;
|
||||
|
||||
glUseProgram((int)fTime + 1);
|
||||
|
||||
int i = ((sample >> 8) << 5) + 2 * 2;
|
||||
float* a = &_4klang_envelope_buffer;
|
||||
float aha = a[i] + a[i + 1];
|
||||
|
||||
glUniform4f(0, fTime, SCREENHEIGHT, ASPECTOFFSET, aha);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
SwapBuffers(hDC);
|
||||
|
||||
::PeekMessage(0, 0, 0, 0, 0);
|
||||
|
||||
glReadPixels(0, 0, SCREENWIDTH, SCREENHEIGHT, GL_BGR_EXT, GL_UNSIGNED_BYTE, data);
|
||||
|
||||
for (int i = 0; i < SCREENWIDTH * SCREENHEIGHT * 3; ++i)
|
||||
{
|
||||
tempBuffer[i] += data[i];
|
||||
}
|
||||
|
||||
if ((frame++ % MOTION_BLUR) == 0)
|
||||
{
|
||||
for (int i = 0; i < SCREENWIDTH * SCREENHEIGHT * 3; ++i)
|
||||
{
|
||||
data[i] = (tempBuffer[i] / MOTION_BLUR);
|
||||
tempBuffer[i] = 0;
|
||||
}
|
||||
|
||||
AVIStreamWrite(avi.m_psCompressed, (frame - 1) / MOTION_BLUR, 1, data, 3 * SCREENWIDTH * SCREENHEIGHT, AVIIF_KEYFRAME, NULL, NULL);
|
||||
}
|
||||
|
||||
} while (sample < MAX_SAMPLES && !GetAsyncKeyState(VK_ESCAPE));
|
||||
|
||||
auto const extraSamples = 0;// SOUND_TICKS_PER_SCENE * SAMPLES_PER_TICK / 4;
|
||||
static SAMPLE_TYPE audioBuffer[2 * (MAX_SAMPLES + extraSamples)];
|
||||
memcpy(audioBuffer + extraSamples * 2, WaveHDR.lpData, WaveHDR.dwBufferLength);
|
||||
AVIStreamWrite(avi.m_psAudio, 0, MAX_SAMPLES + extraSamples, audioBuffer, WaveHDR.dwBufferLength + extraSamples * sizeof(SAMPLE_TYPE) * 2, 0, NULL, NULL);
|
||||
|
||||
AVIStreamClose(avi.m_ps);
|
||||
AVIStreamClose(avi.m_psCompressed);
|
||||
AVIStreamClose(avi.m_psAudio);
|
||||
AVIFileClose(avi.m_pfile);
|
||||
AVIFileExit();
|
||||
}
|
||||
159
ev16-4k/main_rel.cpp
Normal file
159
ev16-4k/main_rel.cpp
Normal file
@@ -0,0 +1,159 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "synth.h"
|
||||
#include <GL/gl.h>
|
||||
#include "glext.h"
|
||||
#include "mark_small.h"
|
||||
|
||||
#ifndef SCREENWIDTH
|
||||
#define SCREENWIDTH 1280
|
||||
#endif
|
||||
|
||||
#ifndef SCREENHEIGHT
|
||||
#define SCREENHEIGHT 720
|
||||
#endif
|
||||
|
||||
#ifndef ASPECTOFFSET
|
||||
#define ASPECTOFFSET 0.375f
|
||||
#endif
|
||||
|
||||
//#define WINDOWED
|
||||
#define WAVHDR_PREPARE_HACK
|
||||
|
||||
#pragma data_seg(".Shader0")
|
||||
#include "mark_small.h"
|
||||
|
||||
struct FAKEPFD
|
||||
{
|
||||
WORD nSize;
|
||||
WORD nVersion;
|
||||
DWORD dwFlags;
|
||||
// Snip
|
||||
};
|
||||
|
||||
struct FAKEDEVMODE
|
||||
{
|
||||
BYTE dmDeviceName[CCHDEVICENAME];
|
||||
WORD dmSpecVersion;
|
||||
WORD dmDriverVersion;
|
||||
WORD dmSize;
|
||||
WORD dmDriverExtra;
|
||||
DWORD dmFields;
|
||||
union {
|
||||
/* printer only fields */
|
||||
struct {
|
||||
short dmOrientation;
|
||||
short dmPaperSize;
|
||||
short dmPaperLength;
|
||||
short dmPaperWidth;
|
||||
short dmScale;
|
||||
short dmCopies;
|
||||
short dmDefaultSource;
|
||||
short dmPrintQuality;
|
||||
};
|
||||
FAKEPFD pfd;
|
||||
};
|
||||
short dmColor;
|
||||
short dmDuplex;
|
||||
short dmYResolution;
|
||||
short dmTTOption;
|
||||
short dmCollate;
|
||||
BYTE dmFormName[CCHFORMNAME];
|
||||
WORD dmLogPixels;
|
||||
DWORD dmBitsPerPel;
|
||||
DWORD dmPelsWidth;
|
||||
DWORD dmPelsHeight;
|
||||
union {
|
||||
DWORD dmDisplayFlags;
|
||||
DWORD dmNup;
|
||||
};
|
||||
DWORD dmDisplayFrequency;
|
||||
};
|
||||
|
||||
#pragma bss_seg(".mainbss")
|
||||
static PFNGLCREATESHADERPROGRAMEXTPROC glCreateShaderProgramEXT;
|
||||
static PFNGLUSEPROGRAMPROC glUseProgram;
|
||||
static PFNGLUNIFORM4FPROC glUniform4f;
|
||||
|
||||
#pragma data_seg(".devmode")
|
||||
static FAKEDEVMODE devmode = {
|
||||
"", 0, 0, sizeof(devmode), 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0, 0, PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0
|
||||
};
|
||||
|
||||
#pragma data_seg(".fltused")
|
||||
int _fltused = 1;
|
||||
|
||||
#pragma data_seg(".glCreateShaderProgramEXT")
|
||||
static const char* sglCreateShaderProgramEXT = "glCreateShaderProgramEXT";
|
||||
|
||||
#pragma data_seg(".glUseProgram")
|
||||
static const char* sglUseProgram = "glUseProgram";
|
||||
|
||||
#pragma data_seg(".glUniform4f")
|
||||
static const char* sglUniform4f = "glUniform4f";
|
||||
|
||||
#define shaderCountOffset 14
|
||||
|
||||
#define ATOM_EDIT 0xC018
|
||||
#define ATOM_STATIC 0xC019
|
||||
|
||||
#define SCENE_LENGTH (SAMPLES_PER_TICK * 128)
|
||||
|
||||
#pragma code_seg(".main")
|
||||
void _cdecl main()
|
||||
{
|
||||
InitSound();
|
||||
|
||||
#ifndef WINDOWED
|
||||
ChangeDisplaySettings((DEVMODEA*)&devmode, CDS_FULLSCREEN);
|
||||
HDC hDC = GetDC(CreateWindowExA(0, (LPCSTR)ATOM_STATIC, 0, WS_POPUP | WS_VISIBLE | WS_MAXIMIZE, 0, 0, 0, 0, 0, 0, 0, 0));
|
||||
#else
|
||||
HDC hDC = GetDC(CreateWindowExA(0, (LPCSTR)ATOM_STATIC, 0, WS_VISIBLE | WS_SYSMENU, 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0, 0));
|
||||
#endif
|
||||
|
||||
//SetPixelFormat(hDC, ChoosePixelFormat(hDC, (const PIXELFORMATDESCRIPTOR*)&devmode.pfd), 0);
|
||||
// if size is a problem, try this:
|
||||
SetPixelFormat(hDC, 8, 0);
|
||||
wglMakeCurrent(hDC, wglCreateContext(hDC));
|
||||
|
||||
glCreateShaderProgramEXT = (PFNGLCREATESHADERPROGRAMEXTPROC)wglGetProcAddress(sglCreateShaderProgramEXT);
|
||||
glUseProgram = (PFNGLUSEPROGRAMPROC)wglGetProcAddress(sglUseProgram);
|
||||
glUniform4f = (PFNGLUNIFORM4FPROC)wglGetProcAddress(sglUniform4f);
|
||||
|
||||
for (int i = 0; i < 12; ++i)
|
||||
{
|
||||
glUseProgram(glCreateShaderProgramEXT(GL_FRAGMENT_SHADER, mark_fs_0));
|
||||
mark_fs_0[shaderCountOffset]++;
|
||||
if (i == 9)
|
||||
{
|
||||
mark_fs_0[shaderCountOffset] = 'A';
|
||||
}
|
||||
glUniform4f(0, i, SCREENHEIGHT, ASPECTOFFSET, 0.0f);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
}
|
||||
|
||||
ShowCursor(FALSE);
|
||||
PlaySound();
|
||||
|
||||
do
|
||||
{
|
||||
get_Sample();
|
||||
|
||||
//float fTime = (float)MMTime.u.sample / SCENE_LENGTH;
|
||||
float fTime = (float)MMTime.u.sample / SCENE_LENGTH;
|
||||
|
||||
glUseProgram((int)(fTime + 0.5f));
|
||||
|
||||
int i = ((MMTime.u.sample >> 8) << 5) + 2 * 2;
|
||||
float* a = &_4klang_envelope_buffer;
|
||||
float aha = a[i] + a[i + 1];
|
||||
|
||||
glUniform4f(0, fTime, SCREENHEIGHT, ASPECTOFFSET, aha);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
SwapBuffers(hDC);
|
||||
|
||||
::PeekMessage(0, 0, 0, 0, 0);
|
||||
} while (MMTime.u.sample < MAX_SAMPLES && !GetAsyncKeyState(VK_ESCAPE));
|
||||
|
||||
ExitProcess(0);
|
||||
}
|
||||
557
ev16-4k/mark.fs
Normal file
557
ev16-4k/mark.fs
Normal file
@@ -0,0 +1,557 @@
|
||||
// make the whole shader non const after optmizing, because we set this constant before compiling
|
||||
@R
|
||||
const int CurScene = 0x9; // this 0x0 has to be readded, because the optimizer throws it away
|
||||
@@
|
||||
@D
|
||||
int CurScene = 0x0;
|
||||
@@
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Zeit
|
||||
// y: Hoehe
|
||||
// z: Aspec
|
||||
uniform vec4 Y;
|
||||
|
||||
// All data of our world
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;//, CurScene;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
//repeat around y axis w times
|
||||
//void rp(inout vec3 p, float trans, float w)
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
//radius of the torus/ radius of the ring
|
||||
/*float torus(vec3 p,float f)
|
||||
{
|
||||
return length(vec2(length(p.xz) - f,p.y));
|
||||
}*/
|
||||
|
||||
/*float signedDistToBox( vec3 p, vec3 b )
|
||||
{
|
||||
vec3 di = abs(p) - b;
|
||||
float mc = maxcomp(di);
|
||||
return mc<0.0 ? mc : length(max(di,0.0));
|
||||
}*/
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
/*float EndlessBar( vec2 p, float y, float z )
|
||||
{
|
||||
return length( max( abs(p) - vec2(y) + vec2(z), 0.0 ) ) - z;
|
||||
}*/
|
||||
|
||||
/*float noise3D( vec3 p )
|
||||
{
|
||||
return fract( sin( p.x * 151.0 + p.y * 33.0 + p.z ) * 11.0 );
|
||||
}
|
||||
|
||||
float smoothnoise(vec3 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec3 o= smoothstep(0.0,1.0,fract( p ));
|
||||
p= floor( p );
|
||||
|
||||
vec4 n= mix(
|
||||
vec4(
|
||||
noise3D( p+e.yyy),//n000,
|
||||
noise3D( p+e.xyy),//n100,
|
||||
noise3D( p+e.yxy),//n010,
|
||||
noise3D( p+e.xxy)),//n110),
|
||||
vec4(
|
||||
noise3D( p+e.yyx),//n001,
|
||||
noise3D( p+e.xyx),//n101,
|
||||
noise3D( p+e.yxx),//n011,
|
||||
noise3D( p+e.xxx)),//n111),
|
||||
o.z);
|
||||
e = mix(n.xy, n.zw, o.y);
|
||||
return mix(e.x, e.y, o.x);
|
||||
}*/
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 7. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 9. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
vec3 o = p;
|
||||
repeatr(o.xy, 28.0, pi2 / 5.0);
|
||||
r = max( 12. - length(p.xz), max(-CBox(o, vec3(3.0, 8., 8.), 0.5),length(length(p.xy) - 32.) - 2.0));
|
||||
repeatr(p.xy, 34.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 2., length(length(p.xy) - 19.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; ++i)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 - 0.33 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.6 + 0.19 * CurTime );
|
||||
//o.xy= rotate( o.xy, 0.2 + 0.89 * CurTime );
|
||||
float y = 444./s;//(900.0 + 66. * CurTime)/ s;
|
||||
//float y = (800.0 - 388. * CurTime)/ s;
|
||||
//vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250., 105., 0)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105., 210., 231.)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
//CurColor = vec3(1.6,1.7,2.5);
|
||||
//CurStep= .0;
|
||||
CurColor = vec3(224., 228., 204.)/255.;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
/*void ToRes(vec3 Color, float Factor)
|
||||
{
|
||||
cRes+= Color * cFac;
|
||||
cFac*= Factor;
|
||||
}*/
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*pi2 * 0.5)),1.0);
|
||||
@D
|
||||
blend = 1;
|
||||
@@
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
//float d = length(uv2.y) + (1.01 - blend) * pow( length(uv2.x), 2.0); // eyeball effect
|
||||
//col *= smoothstep(1.0, 0.9, d);
|
||||
|
||||
float d = length(uv2.y) - blend; //this is the simple version
|
||||
if (d >= -0.04) col*=0.7;
|
||||
if (d >= -0.02) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Z = (gl_FragCoord.xy / Y.zw) * vec2(Y.z/Y.w, 1);
|
||||
|
||||
CurTime= fract(Y.x);
|
||||
@D
|
||||
CurScene= Y.x - fract(Y.x);
|
||||
@@
|
||||
CurTime2= CurTime * CurTime;
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
//Kamera sitzt an dieser Position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.2 );
|
||||
//rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
////////////// Shader 1
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.xz= rotate( rayDir.xz, 3.0 );
|
||||
//CurTime2 = CurTime;
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 20.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
////////////// Shader 2
|
||||
p= vec3( -0.0, 177., 166.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -333., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
/*else if( CurScene < 11 ) // <- ersatzkamera fuer Szene 3
|
||||
{
|
||||
p= vec3( -77.0, -122., -177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.8);
|
||||
}*/
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
/*else if( CurScene < 15 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 3.3), 88.0, -44.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 2.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}
|
||||
else if( CurScene < 16 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 0.8 ), 12.0, 99.0);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}*/
|
||||
|
||||
//CurScene= Y.x - fract(Y.x);
|
||||
|
||||
@D
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//Debugzeug fuer Kamerasteuerung
|
||||
if( true )
|
||||
{
|
||||
p.x= gl_ModelViewMatrix[0][0];
|
||||
p.y= gl_ModelViewMatrix[0][1];
|
||||
p.z= gl_ModelViewMatrix[0][2];
|
||||
|
||||
float a1= gl_ModelViewMatrix[1][1];
|
||||
float c1,s1;
|
||||
|
||||
//vec3 q1= vec3((Z.xy - 0.5), 0.6);
|
||||
|
||||
float ScreenHeight = Y.z;
|
||||
float AspectOffset = 1280.0 / 720.0 * 0.5 - 0.5; //= 0.445;
|
||||
|
||||
vec3 q1 = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.6);
|
||||
q1.x -= Y.z;
|
||||
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.y = c1 * q1.y - s1 * q1.z;
|
||||
rayDir.x= q1.x;
|
||||
rayDir.z = s1 * q1.y + c1 * q1.z;
|
||||
|
||||
a1= gl_ModelViewMatrix[1][0];
|
||||
q1=rayDir;
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.x = c1 * q1.x + s1 * q1.z;
|
||||
rayDir.z = -s1 * q1.x + c1 * q1.z;
|
||||
}
|
||||
//Ende Debugzeug fuer Kamerasteuerung
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
@@
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
//float t=smoothnoise( rayDir*666.0 )*0.1,y,z;
|
||||
//float t= 0.5 * plasm(999. * rayDir.x, 999. * rayDir.z, 999. * rayDir.y,999. * rayDir.z),y,z;
|
||||
float t= 0.0,y,z;
|
||||
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog =
|
||||
lightSphere(rayDir, LightColor, HitMaterial.zw);// +
|
||||
//lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
while(m++<5-CurScene/4)
|
||||
{
|
||||
//bis zu einer Oberflaeche steppen
|
||||
//for (CurStep=1.0;t<999.0 && CurStep>t*.003;t+=0.01+max(0.0, CurStep),RayStep=rayDir*t )
|
||||
float ii = 111.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,--ii )
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(88., 22., ii);
|
||||
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
|
||||
//Startpunkt und Richtung fuer reflektierten Strahl;
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
// float gradlen = length(n / (2 * CurNormal.x));
|
||||
// float error = abs(gradlen - 1.0);
|
||||
// gl_FragColor.xyz = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), error);
|
||||
// return;
|
||||
|
||||
//CurNormal = vec2(0.0, 0.0);
|
||||
mat(p);
|
||||
//n.xz += CurNormal;
|
||||
n= normalize(n);
|
||||
//CurStep ab hier == Reflektion !!!
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
//float ao(vec3 p, vec3 n, float d, float i) {
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y--)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);//*(1.0-Reflect);
|
||||
cFac*= CurStep;// Reflect * (1.0-t/tmax);
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
//gl_FragColor.xyz = smoothstep(-12.0, -11.8, -Y.x) * mix((cRes + cFac*
|
||||
// ( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
// lightSphere(rayDir, BackColor, HitMaterial.xy))), fog, fogAmount / 2.0);
|
||||
}
|
||||
557
ev16-4k/mark.fs_0
Normal file
557
ev16-4k/mark.fs_0
Normal file
@@ -0,0 +1,557 @@
|
||||
// make the whole shader non const after optmizing, because we set this constant before compiling
|
||||
|
||||
const int CurScene = 0x9; // this 0x0 has to be readded, because the optimizer throws it away
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Zeit
|
||||
// y: Hoehe
|
||||
// z: Aspec
|
||||
uniform vec4 Y;
|
||||
|
||||
// All data of our world
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;//, CurScene;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
//repeat around y axis w times
|
||||
//void rp(inout vec3 p, float trans, float w)
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
//radius of the torus/ radius of the ring
|
||||
/*float torus(vec3 p,float f)
|
||||
{
|
||||
return length(vec2(length(p.xz) - f,p.y));
|
||||
}*/
|
||||
|
||||
/*float signedDistToBox( vec3 p, vec3 b )
|
||||
{
|
||||
vec3 di = abs(p) - b;
|
||||
float mc = maxcomp(di);
|
||||
return mc<0.0 ? mc : length(max(di,0.0));
|
||||
}*/
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
/*float EndlessBar( vec2 p, float y, float z )
|
||||
{
|
||||
return length( max( abs(p) - vec2(y) + vec2(z), 0.0 ) ) - z;
|
||||
}*/
|
||||
|
||||
/*float noise3D( vec3 p )
|
||||
{
|
||||
return fract( sin( p.x * 151.0 + p.y * 33.0 + p.z ) * 11.0 );
|
||||
}
|
||||
|
||||
float smoothnoise(vec3 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec3 o= smoothstep(0.0,1.0,fract( p ));
|
||||
p= floor( p );
|
||||
|
||||
vec4 n= mix(
|
||||
vec4(
|
||||
noise3D( p+e.yyy),//n000,
|
||||
noise3D( p+e.xyy),//n100,
|
||||
noise3D( p+e.yxy),//n010,
|
||||
noise3D( p+e.xxy)),//n110),
|
||||
vec4(
|
||||
noise3D( p+e.yyx),//n001,
|
||||
noise3D( p+e.xyx),//n101,
|
||||
noise3D( p+e.yxx),//n011,
|
||||
noise3D( p+e.xxx)),//n111),
|
||||
o.z);
|
||||
e = mix(n.xy, n.zw, o.y);
|
||||
return mix(e.x, e.y, o.x);
|
||||
}*/
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 7. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 9. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
vec3 o = p;
|
||||
repeatr(o.xy, 28.0, pi2 / 5.0);
|
||||
r = max( 12. - length(p.xz), max(-CBox(o, vec3(3.0, 8., 8.), 0.5),length(length(p.xy) - 32.) - 2.0));
|
||||
repeatr(p.xy, 34.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 2., length(length(p.xy) - 19.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; ++i)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 - 0.33 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.6 + 0.19 * CurTime );
|
||||
//o.xy= rotate( o.xy, 0.2 + 0.89 * CurTime );
|
||||
float y = 444./s;//(900.0 + 66. * CurTime)/ s;
|
||||
//float y = (800.0 - 388. * CurTime)/ s;
|
||||
//vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250., 105., 0)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105., 210., 231.)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
//CurColor = vec3(1.6,1.7,2.5);
|
||||
//CurStep= .0;
|
||||
CurColor = vec3(224., 228., 204.)/255.;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
/*void ToRes(vec3 Color, float Factor)
|
||||
{
|
||||
cRes+= Color * cFac;
|
||||
cFac*= Factor;
|
||||
}*/
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*pi2 * 0.5)),1.0);
|
||||
|
||||
|
||||
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
//float d = length(uv2.y) + (1.01 - blend) * pow( length(uv2.x), 2.0); // eyeball effect
|
||||
//col *= smoothstep(1.0, 0.9, d);
|
||||
|
||||
float d = length(uv2.y) - blend; //this is the simple version
|
||||
if (d >= -0.04) col*=0.7;
|
||||
if (d >= -0.02) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Z = (gl_FragCoord.xy / Y.zw) * vec2(Y.z/Y.w, 1);
|
||||
|
||||
CurTime= fract(Y.x);
|
||||
|
||||
|
||||
|
||||
CurTime2= CurTime * CurTime;
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
//Kamera sitzt an dieser Position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.2 );
|
||||
//rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
////////////// Shader 1
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.xz= rotate( rayDir.xz, 3.0 );
|
||||
//CurTime2 = CurTime;
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 20.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
////////////// Shader 2
|
||||
p= vec3( -0.0, 177., 166.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -333., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
/*else if( CurScene < 11 ) // <- ersatzkamera fuer Szene 3
|
||||
{
|
||||
p= vec3( -77.0, -122., -177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.8);
|
||||
}*/
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
/*else if( CurScene < 15 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 3.3), 88.0, -44.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 2.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}
|
||||
else if( CurScene < 16 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 0.8 ), 12.0, 99.0);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}*/
|
||||
|
||||
//CurScene= Y.x - fract(Y.x);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
//float t=smoothnoise( rayDir*666.0 )*0.1,y,z;
|
||||
//float t= 0.5 * plasm(999. * rayDir.x, 999. * rayDir.z, 999. * rayDir.y,999. * rayDir.z),y,z;
|
||||
float t= 0.0,y,z;
|
||||
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog =
|
||||
lightSphere(rayDir, LightColor, HitMaterial.zw);// +
|
||||
//lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
while(m++<5-CurScene/4)
|
||||
{
|
||||
//bis zu einer Oberflaeche steppen
|
||||
//for (CurStep=1.0;t<999.0 && CurStep>t*.003;t+=0.01+max(0.0, CurStep),RayStep=rayDir*t )
|
||||
float ii = 111.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,--ii )
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(88., 22., ii);
|
||||
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
|
||||
//Startpunkt und Richtung fuer reflektierten Strahl;
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
// float gradlen = length(n / (2 * CurNormal.x));
|
||||
// float error = abs(gradlen - 1.0);
|
||||
// gl_FragColor.xyz = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), error);
|
||||
// return;
|
||||
|
||||
//CurNormal = vec2(0.0, 0.0);
|
||||
mat(p);
|
||||
//n.xz += CurNormal;
|
||||
n= normalize(n);
|
||||
//CurStep ab hier == Reflektion !!!
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
//float ao(vec3 p, vec3 n, float d, float i) {
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y--)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);//*(1.0-Reflect);
|
||||
cFac*= CurStep;// Reflect * (1.0-t/tmax);
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
//gl_FragColor.xyz = smoothstep(-12.0, -11.8, -Y.x) * mix((cRes + cFac*
|
||||
// ( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
// lightSphere(rayDir, BackColor, HitMaterial.xy))), fog, fogAmount / 2.0);
|
||||
}
|
||||
557
ev16-4k/mark.fs_0_dbg
Normal file
557
ev16-4k/mark.fs_0_dbg
Normal file
@@ -0,0 +1,557 @@
|
||||
// make the whole shader non const after optmizing, because we set this constant before compiling
|
||||
|
||||
|
||||
|
||||
|
||||
int CurScene = 0x0;
|
||||
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Zeit
|
||||
// y: Hoehe
|
||||
// z: Aspec
|
||||
uniform vec4 Y;
|
||||
|
||||
// All data of our world
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;//, CurScene;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
//repeat around y axis w times
|
||||
//void rp(inout vec3 p, float trans, float w)
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
//radius of the torus/ radius of the ring
|
||||
/*float torus(vec3 p,float f)
|
||||
{
|
||||
return length(vec2(length(p.xz) - f,p.y));
|
||||
}*/
|
||||
|
||||
/*float signedDistToBox( vec3 p, vec3 b )
|
||||
{
|
||||
vec3 di = abs(p) - b;
|
||||
float mc = maxcomp(di);
|
||||
return mc<0.0 ? mc : length(max(di,0.0));
|
||||
}*/
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
/*float EndlessBar( vec2 p, float y, float z )
|
||||
{
|
||||
return length( max( abs(p) - vec2(y) + vec2(z), 0.0 ) ) - z;
|
||||
}*/
|
||||
|
||||
/*float noise3D( vec3 p )
|
||||
{
|
||||
return fract( sin( p.x * 151.0 + p.y * 33.0 + p.z ) * 11.0 );
|
||||
}
|
||||
|
||||
float smoothnoise(vec3 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec3 o= smoothstep(0.0,1.0,fract( p ));
|
||||
p= floor( p );
|
||||
|
||||
vec4 n= mix(
|
||||
vec4(
|
||||
noise3D( p+e.yyy),//n000,
|
||||
noise3D( p+e.xyy),//n100,
|
||||
noise3D( p+e.yxy),//n010,
|
||||
noise3D( p+e.xxy)),//n110),
|
||||
vec4(
|
||||
noise3D( p+e.yyx),//n001,
|
||||
noise3D( p+e.xyx),//n101,
|
||||
noise3D( p+e.yxx),//n011,
|
||||
noise3D( p+e.xxx)),//n111),
|
||||
o.z);
|
||||
e = mix(n.xy, n.zw, o.y);
|
||||
return mix(e.x, e.y, o.x);
|
||||
}*/
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 7. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 9. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
vec3 o = p;
|
||||
repeatr(o.xy, 28.0, pi2 / 5.0);
|
||||
r = max( 12. - length(p.xz), max(-CBox(o, vec3(3.0, 8., 8.), 0.5),length(length(p.xy) - 32.) - 2.0));
|
||||
repeatr(p.xy, 34.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 2., length(length(p.xy) - 19.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; ++i)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 - 0.33 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.6 + 0.19 * CurTime );
|
||||
//o.xy= rotate( o.xy, 0.2 + 0.89 * CurTime );
|
||||
float y = 444./s;//(900.0 + 66. * CurTime)/ s;
|
||||
//float y = (800.0 - 388. * CurTime)/ s;
|
||||
//vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250., 105., 0)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105., 210., 231.)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
//CurColor = vec3(1.6,1.7,2.5);
|
||||
//CurStep= .0;
|
||||
CurColor = vec3(224., 228., 204.)/255.;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
/*void ToRes(vec3 Color, float Factor)
|
||||
{
|
||||
cRes+= Color * cFac;
|
||||
cFac*= Factor;
|
||||
}*/
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*pi2 * 0.5)),1.0);
|
||||
|
||||
blend = 1;
|
||||
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
//float d = length(uv2.y) + (1.01 - blend) * pow( length(uv2.x), 2.0); // eyeball effect
|
||||
//col *= smoothstep(1.0, 0.9, d);
|
||||
|
||||
float d = length(uv2.y) - blend; //this is the simple version
|
||||
if (d >= -0.04) col*=0.7;
|
||||
if (d >= -0.02) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Z = (gl_FragCoord.xy / Y.zw) * vec2(Y.z/Y.w, 1);
|
||||
|
||||
CurTime= fract(Y.x);
|
||||
|
||||
CurScene= Y.x - fract(Y.x);
|
||||
|
||||
CurTime2= CurTime * CurTime;
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
//Kamera sitzt an dieser Position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.2 );
|
||||
//rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
////////////// Shader 1
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.xz= rotate( rayDir.xz, 3.0 );
|
||||
//CurTime2 = CurTime;
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 20.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
////////////// Shader 2
|
||||
p= vec3( -0.0, 177., 166.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -333., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
/*else if( CurScene < 11 ) // <- ersatzkamera fuer Szene 3
|
||||
{
|
||||
p= vec3( -77.0, -122., -177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.8);
|
||||
}*/
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
/*else if( CurScene < 15 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 3.3), 88.0, -44.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 2.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}
|
||||
else if( CurScene < 16 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 0.8 ), 12.0, 99.0);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}*/
|
||||
|
||||
//CurScene= Y.x - fract(Y.x);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//Debugzeug fuer Kamerasteuerung
|
||||
if( true )
|
||||
{
|
||||
p.x= gl_ModelViewMatrix[0][0];
|
||||
p.y= gl_ModelViewMatrix[0][1];
|
||||
p.z= gl_ModelViewMatrix[0][2];
|
||||
|
||||
float a1= gl_ModelViewMatrix[1][1];
|
||||
float c1,s1;
|
||||
|
||||
//vec3 q1= vec3((Z.xy - 0.5), 0.6);
|
||||
|
||||
float ScreenHeight = Y.z;
|
||||
float AspectOffset = 1280.0 / 720.0 * 0.5 - 0.5; //= 0.445;
|
||||
|
||||
vec3 q1 = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.6);
|
||||
q1.x -= Y.z;
|
||||
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.y = c1 * q1.y - s1 * q1.z;
|
||||
rayDir.x= q1.x;
|
||||
rayDir.z = s1 * q1.y + c1 * q1.z;
|
||||
|
||||
a1= gl_ModelViewMatrix[1][0];
|
||||
q1=rayDir;
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.x = c1 * q1.x + s1 * q1.z;
|
||||
rayDir.z = -s1 * q1.x + c1 * q1.z;
|
||||
}
|
||||
//Ende Debugzeug fuer Kamerasteuerung
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
//float t=smoothnoise( rayDir*666.0 )*0.1,y,z;
|
||||
//float t= 0.5 * plasm(999. * rayDir.x, 999. * rayDir.z, 999. * rayDir.y,999. * rayDir.z),y,z;
|
||||
float t= 0.0,y,z;
|
||||
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog =
|
||||
lightSphere(rayDir, LightColor, HitMaterial.zw);// +
|
||||
//lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
while(m++<5-CurScene/4)
|
||||
{
|
||||
//bis zu einer Oberflaeche steppen
|
||||
//for (CurStep=1.0;t<999.0 && CurStep>t*.003;t+=0.01+max(0.0, CurStep),RayStep=rayDir*t )
|
||||
float ii = 111.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,--ii )
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(88., 22., ii);
|
||||
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
|
||||
//Startpunkt und Richtung fuer reflektierten Strahl;
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
// float gradlen = length(n / (2 * CurNormal.x));
|
||||
// float error = abs(gradlen - 1.0);
|
||||
// gl_FragColor.xyz = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), error);
|
||||
// return;
|
||||
|
||||
//CurNormal = vec2(0.0, 0.0);
|
||||
mat(p);
|
||||
//n.xz += CurNormal;
|
||||
n= normalize(n);
|
||||
//CurStep ab hier == Reflektion !!!
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
//float ao(vec3 p, vec3 n, float d, float i) {
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y--)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);//*(1.0-Reflect);
|
||||
cFac*= CurStep;// Reflect * (1.0-t/tmax);
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
//gl_FragColor.xyz = smoothstep(-12.0, -11.8, -Y.x) * mix((cRes + cFac*
|
||||
// ( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
// lightSphere(rayDir, BackColor, HitMaterial.xy))), fog, fogAmount / 2.0);
|
||||
}
|
||||
557
ev16-4k/mark.fs_1
Normal file
557
ev16-4k/mark.fs_1
Normal file
@@ -0,0 +1,557 @@
|
||||
// make the whole shader non const after optmizing, because we set this constant before compiling
|
||||
|
||||
const int CurScene = 0x9; // this 0x0 has to be readded, because the optimizer throws it away
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Zeit
|
||||
// y: Hoehe
|
||||
// z: Aspec
|
||||
uniform vec4 Y;
|
||||
|
||||
// All data of our world
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;//, CurScene;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
//repeat around y axis w times
|
||||
//void rp(inout vec3 p, float trans, float w)
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
//radius of the torus/ radius of the ring
|
||||
/*float torus(vec3 p,float f)
|
||||
{
|
||||
return length(vec2(length(p.xz) - f,p.y));
|
||||
}*/
|
||||
|
||||
/*float signedDistToBox( vec3 p, vec3 b )
|
||||
{
|
||||
vec3 di = abs(p) - b;
|
||||
float mc = maxcomp(di);
|
||||
return mc<0.0 ? mc : length(max(di,0.0));
|
||||
}*/
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
/*float EndlessBar( vec2 p, float y, float z )
|
||||
{
|
||||
return length( max( abs(p) - vec2(y) + vec2(z), 0.0 ) ) - z;
|
||||
}*/
|
||||
|
||||
/*float noise3D( vec3 p )
|
||||
{
|
||||
return fract( sin( p.x * 151.0 + p.y * 33.0 + p.z ) * 11.0 );
|
||||
}
|
||||
|
||||
float smoothnoise(vec3 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec3 o= smoothstep(0.0,1.0,fract( p ));
|
||||
p= floor( p );
|
||||
|
||||
vec4 n= mix(
|
||||
vec4(
|
||||
noise3D( p+e.yyy),//n000,
|
||||
noise3D( p+e.xyy),//n100,
|
||||
noise3D( p+e.yxy),//n010,
|
||||
noise3D( p+e.xxy)),//n110),
|
||||
vec4(
|
||||
noise3D( p+e.yyx),//n001,
|
||||
noise3D( p+e.xyx),//n101,
|
||||
noise3D( p+e.yxx),//n011,
|
||||
noise3D( p+e.xxx)),//n111),
|
||||
o.z);
|
||||
e = mix(n.xy, n.zw, o.y);
|
||||
return mix(e.x, e.y, o.x);
|
||||
}*/
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 7. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 9. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
vec3 o = p;
|
||||
repeatr(o.xy, 28.0, pi2 / 5.0);
|
||||
r = max( 12. - length(p.xz), max(-CBox(o, vec3(3.0, 8., 8.), 0.5),length(length(p.xy) - 32.) - 2.0));
|
||||
repeatr(p.xy, 34.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 2., length(length(p.xy) - 19.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; ++i)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 - 0.33 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.6 + 0.19 * CurTime );
|
||||
//o.xy= rotate( o.xy, 0.2 + 0.89 * CurTime );
|
||||
float y = 444./s;//(900.0 + 66. * CurTime)/ s;
|
||||
//float y = (800.0 - 388. * CurTime)/ s;
|
||||
//vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250., 105., 0)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105., 210., 231.)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
//CurColor = vec3(1.6,1.7,2.5);
|
||||
//CurStep= .0;
|
||||
CurColor = vec3(224., 228., 204.)/255.;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
/*void ToRes(vec3 Color, float Factor)
|
||||
{
|
||||
cRes+= Color * cFac;
|
||||
cFac*= Factor;
|
||||
}*/
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*pi2 * 0.5)),1.0);
|
||||
|
||||
|
||||
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
//float d = length(uv2.y) + (1.01 - blend) * pow( length(uv2.x), 2.0); // eyeball effect
|
||||
//col *= smoothstep(1.0, 0.9, d);
|
||||
|
||||
float d = length(uv2.y) - blend; //this is the simple version
|
||||
if (d >= -0.04) col*=0.7;
|
||||
if (d >= -0.02) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Z = (gl_FragCoord.xy / Y.zw) * vec2(Y.z/Y.w, 1);
|
||||
|
||||
CurTime= fract(Y.x);
|
||||
|
||||
|
||||
|
||||
CurTime2= CurTime * CurTime;
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
//Kamera sitzt an dieser Position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.2 );
|
||||
//rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
////////////// Shader 1
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.xz= rotate( rayDir.xz, 3.0 );
|
||||
//CurTime2 = CurTime;
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 20.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
////////////// Shader 2
|
||||
p= vec3( -0.0, 177., 166.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -333., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
/*else if( CurScene < 11 ) // <- ersatzkamera fuer Szene 3
|
||||
{
|
||||
p= vec3( -77.0, -122., -177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.8);
|
||||
}*/
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
/*else if( CurScene < 15 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 3.3), 88.0, -44.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 2.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}
|
||||
else if( CurScene < 16 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 0.8 ), 12.0, 99.0);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}*/
|
||||
|
||||
//CurScene= Y.x - fract(Y.x);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
//float t=smoothnoise( rayDir*666.0 )*0.1,y,z;
|
||||
//float t= 0.5 * plasm(999. * rayDir.x, 999. * rayDir.z, 999. * rayDir.y,999. * rayDir.z),y,z;
|
||||
float t= 0.0,y,z;
|
||||
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog =
|
||||
lightSphere(rayDir, LightColor, HitMaterial.zw);// +
|
||||
//lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
while(m++<5-CurScene/4)
|
||||
{
|
||||
//bis zu einer Oberflaeche steppen
|
||||
//for (CurStep=1.0;t<999.0 && CurStep>t*.003;t+=0.01+max(0.0, CurStep),RayStep=rayDir*t )
|
||||
float ii = 111.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,--ii )
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(88., 22., ii);
|
||||
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
|
||||
//Startpunkt und Richtung fuer reflektierten Strahl;
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
// float gradlen = length(n / (2 * CurNormal.x));
|
||||
// float error = abs(gradlen - 1.0);
|
||||
// gl_FragColor.xyz = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), error);
|
||||
// return;
|
||||
|
||||
//CurNormal = vec2(0.0, 0.0);
|
||||
mat(p);
|
||||
//n.xz += CurNormal;
|
||||
n= normalize(n);
|
||||
//CurStep ab hier == Reflektion !!!
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
//float ao(vec3 p, vec3 n, float d, float i) {
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y--)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);//*(1.0-Reflect);
|
||||
cFac*= CurStep;// Reflect * (1.0-t/tmax);
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
//gl_FragColor.xyz = smoothstep(-12.0, -11.8, -Y.x) * mix((cRes + cFac*
|
||||
// ( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
// lightSphere(rayDir, BackColor, HitMaterial.xy))), fog, fogAmount / 2.0);
|
||||
}
|
||||
557
ev16-4k/mark.fs_1_dbg
Normal file
557
ev16-4k/mark.fs_1_dbg
Normal file
@@ -0,0 +1,557 @@
|
||||
// make the whole shader non const after optmizing, because we set this constant before compiling
|
||||
|
||||
|
||||
|
||||
|
||||
int CurScene = 0x0;
|
||||
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Zeit
|
||||
// y: Hoehe
|
||||
// z: Aspec
|
||||
uniform vec4 Y;
|
||||
|
||||
// All data of our world
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;//, CurScene;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
//repeat around y axis w times
|
||||
//void rp(inout vec3 p, float trans, float w)
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
//radius of the torus/ radius of the ring
|
||||
/*float torus(vec3 p,float f)
|
||||
{
|
||||
return length(vec2(length(p.xz) - f,p.y));
|
||||
}*/
|
||||
|
||||
/*float signedDistToBox( vec3 p, vec3 b )
|
||||
{
|
||||
vec3 di = abs(p) - b;
|
||||
float mc = maxcomp(di);
|
||||
return mc<0.0 ? mc : length(max(di,0.0));
|
||||
}*/
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
/*float EndlessBar( vec2 p, float y, float z )
|
||||
{
|
||||
return length( max( abs(p) - vec2(y) + vec2(z), 0.0 ) ) - z;
|
||||
}*/
|
||||
|
||||
/*float noise3D( vec3 p )
|
||||
{
|
||||
return fract( sin( p.x * 151.0 + p.y * 33.0 + p.z ) * 11.0 );
|
||||
}
|
||||
|
||||
float smoothnoise(vec3 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec3 o= smoothstep(0.0,1.0,fract( p ));
|
||||
p= floor( p );
|
||||
|
||||
vec4 n= mix(
|
||||
vec4(
|
||||
noise3D( p+e.yyy),//n000,
|
||||
noise3D( p+e.xyy),//n100,
|
||||
noise3D( p+e.yxy),//n010,
|
||||
noise3D( p+e.xxy)),//n110),
|
||||
vec4(
|
||||
noise3D( p+e.yyx),//n001,
|
||||
noise3D( p+e.xyx),//n101,
|
||||
noise3D( p+e.yxx),//n011,
|
||||
noise3D( p+e.xxx)),//n111),
|
||||
o.z);
|
||||
e = mix(n.xy, n.zw, o.y);
|
||||
return mix(e.x, e.y, o.x);
|
||||
}*/
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 7. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 9. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
vec3 o = p;
|
||||
repeatr(o.xy, 28.0, pi2 / 5.0);
|
||||
r = max( 12. - length(p.xz), max(-CBox(o, vec3(3.0, 8., 8.), 0.5),length(length(p.xy) - 32.) - 2.0));
|
||||
repeatr(p.xy, 34.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 2., length(length(p.xy) - 19.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; ++i)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 - 0.33 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.6 + 0.19 * CurTime );
|
||||
//o.xy= rotate( o.xy, 0.2 + 0.89 * CurTime );
|
||||
float y = 444./s;//(900.0 + 66. * CurTime)/ s;
|
||||
//float y = (800.0 - 388. * CurTime)/ s;
|
||||
//vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250., 105., 0)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105., 210., 231.)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
//CurColor = vec3(1.6,1.7,2.5);
|
||||
//CurStep= .0;
|
||||
CurColor = vec3(224., 228., 204.)/255.;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
/*void ToRes(vec3 Color, float Factor)
|
||||
{
|
||||
cRes+= Color * cFac;
|
||||
cFac*= Factor;
|
||||
}*/
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*pi2 * 0.5)),1.0);
|
||||
|
||||
blend = 1;
|
||||
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
//float d = length(uv2.y) + (1.01 - blend) * pow( length(uv2.x), 2.0); // eyeball effect
|
||||
//col *= smoothstep(1.0, 0.9, d);
|
||||
|
||||
float d = length(uv2.y) - blend; //this is the simple version
|
||||
if (d >= -0.04) col*=0.7;
|
||||
if (d >= -0.02) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Z = (gl_FragCoord.xy / Y.zw) * vec2(Y.z/Y.w, 1);
|
||||
|
||||
CurTime= fract(Y.x);
|
||||
|
||||
CurScene= Y.x - fract(Y.x);
|
||||
|
||||
CurTime2= CurTime * CurTime;
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
//Kamera sitzt an dieser Position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.2 );
|
||||
//rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
////////////// Shader 1
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.xz= rotate( rayDir.xz, 3.0 );
|
||||
//CurTime2 = CurTime;
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 20.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
////////////// Shader 2
|
||||
p= vec3( -0.0, 177., 166.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -333., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
/*else if( CurScene < 11 ) // <- ersatzkamera fuer Szene 3
|
||||
{
|
||||
p= vec3( -77.0, -122., -177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.8);
|
||||
}*/
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
/*else if( CurScene < 15 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 3.3), 88.0, -44.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 2.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}
|
||||
else if( CurScene < 16 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 0.8 ), 12.0, 99.0);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}*/
|
||||
|
||||
//CurScene= Y.x - fract(Y.x);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//Debugzeug fuer Kamerasteuerung
|
||||
if( true )
|
||||
{
|
||||
p.x= gl_ModelViewMatrix[0][0];
|
||||
p.y= gl_ModelViewMatrix[0][1];
|
||||
p.z= gl_ModelViewMatrix[0][2];
|
||||
|
||||
float a1= gl_ModelViewMatrix[1][1];
|
||||
float c1,s1;
|
||||
|
||||
//vec3 q1= vec3((Z.xy - 0.5), 0.6);
|
||||
|
||||
float ScreenHeight = Y.z;
|
||||
float AspectOffset = 1280.0 / 720.0 * 0.5 - 0.5; //= 0.445;
|
||||
|
||||
vec3 q1 = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.6);
|
||||
q1.x -= Y.z;
|
||||
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.y = c1 * q1.y - s1 * q1.z;
|
||||
rayDir.x= q1.x;
|
||||
rayDir.z = s1 * q1.y + c1 * q1.z;
|
||||
|
||||
a1= gl_ModelViewMatrix[1][0];
|
||||
q1=rayDir;
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.x = c1 * q1.x + s1 * q1.z;
|
||||
rayDir.z = -s1 * q1.x + c1 * q1.z;
|
||||
}
|
||||
//Ende Debugzeug fuer Kamerasteuerung
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
//float t=smoothnoise( rayDir*666.0 )*0.1,y,z;
|
||||
//float t= 0.5 * plasm(999. * rayDir.x, 999. * rayDir.z, 999. * rayDir.y,999. * rayDir.z),y,z;
|
||||
float t= 0.0,y,z;
|
||||
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog =
|
||||
lightSphere(rayDir, LightColor, HitMaterial.zw);// +
|
||||
//lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
while(m++<5-CurScene/4)
|
||||
{
|
||||
//bis zu einer Oberflaeche steppen
|
||||
//for (CurStep=1.0;t<999.0 && CurStep>t*.003;t+=0.01+max(0.0, CurStep),RayStep=rayDir*t )
|
||||
float ii = 111.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,--ii )
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(88., 22., ii);
|
||||
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
|
||||
//Startpunkt und Richtung fuer reflektierten Strahl;
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
// float gradlen = length(n / (2 * CurNormal.x));
|
||||
// float error = abs(gradlen - 1.0);
|
||||
// gl_FragColor.xyz = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), error);
|
||||
// return;
|
||||
|
||||
//CurNormal = vec2(0.0, 0.0);
|
||||
mat(p);
|
||||
//n.xz += CurNormal;
|
||||
n= normalize(n);
|
||||
//CurStep ab hier == Reflektion !!!
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
//float ao(vec3 p, vec3 n, float d, float i) {
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y--)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);//*(1.0-Reflect);
|
||||
cFac*= CurStep;// Reflect * (1.0-t/tmax);
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
//gl_FragColor.xyz = smoothstep(-12.0, -11.8, -Y.x) * mix((cRes + cFac*
|
||||
// ( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
// lightSphere(rayDir, BackColor, HitMaterial.xy))), fog, fogAmount / 2.0);
|
||||
}
|
||||
557
ev16-4k/mark.fs_2
Normal file
557
ev16-4k/mark.fs_2
Normal file
@@ -0,0 +1,557 @@
|
||||
// make the whole shader non const after optmizing, because we set this constant before compiling
|
||||
|
||||
const int CurScene = 0x9; // this 0x0 has to be readded, because the optimizer throws it away
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Zeit
|
||||
// y: Hoehe
|
||||
// z: Aspec
|
||||
uniform vec4 Y;
|
||||
|
||||
// All data of our world
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;//, CurScene;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
//repeat around y axis w times
|
||||
//void rp(inout vec3 p, float trans, float w)
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
//radius of the torus/ radius of the ring
|
||||
/*float torus(vec3 p,float f)
|
||||
{
|
||||
return length(vec2(length(p.xz) - f,p.y));
|
||||
}*/
|
||||
|
||||
/*float signedDistToBox( vec3 p, vec3 b )
|
||||
{
|
||||
vec3 di = abs(p) - b;
|
||||
float mc = maxcomp(di);
|
||||
return mc<0.0 ? mc : length(max(di,0.0));
|
||||
}*/
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
/*float EndlessBar( vec2 p, float y, float z )
|
||||
{
|
||||
return length( max( abs(p) - vec2(y) + vec2(z), 0.0 ) ) - z;
|
||||
}*/
|
||||
|
||||
/*float noise3D( vec3 p )
|
||||
{
|
||||
return fract( sin( p.x * 151.0 + p.y * 33.0 + p.z ) * 11.0 );
|
||||
}
|
||||
|
||||
float smoothnoise(vec3 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec3 o= smoothstep(0.0,1.0,fract( p ));
|
||||
p= floor( p );
|
||||
|
||||
vec4 n= mix(
|
||||
vec4(
|
||||
noise3D( p+e.yyy),//n000,
|
||||
noise3D( p+e.xyy),//n100,
|
||||
noise3D( p+e.yxy),//n010,
|
||||
noise3D( p+e.xxy)),//n110),
|
||||
vec4(
|
||||
noise3D( p+e.yyx),//n001,
|
||||
noise3D( p+e.xyx),//n101,
|
||||
noise3D( p+e.yxx),//n011,
|
||||
noise3D( p+e.xxx)),//n111),
|
||||
o.z);
|
||||
e = mix(n.xy, n.zw, o.y);
|
||||
return mix(e.x, e.y, o.x);
|
||||
}*/
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 7. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 9. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
vec3 o = p;
|
||||
repeatr(o.xy, 28.0, pi2 / 5.0);
|
||||
r = max( 12. - length(p.xz), max(-CBox(o, vec3(3.0, 8., 8.), 0.5),length(length(p.xy) - 32.) - 2.0));
|
||||
repeatr(p.xy, 34.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 2., length(length(p.xy) - 19.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; ++i)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 - 0.33 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.6 + 0.19 * CurTime );
|
||||
//o.xy= rotate( o.xy, 0.2 + 0.89 * CurTime );
|
||||
float y = 444./s;//(900.0 + 66. * CurTime)/ s;
|
||||
//float y = (800.0 - 388. * CurTime)/ s;
|
||||
//vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250., 105., 0)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105., 210., 231.)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
//CurColor = vec3(1.6,1.7,2.5);
|
||||
//CurStep= .0;
|
||||
CurColor = vec3(224., 228., 204.)/255.;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
/*void ToRes(vec3 Color, float Factor)
|
||||
{
|
||||
cRes+= Color * cFac;
|
||||
cFac*= Factor;
|
||||
}*/
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*pi2 * 0.5)),1.0);
|
||||
|
||||
|
||||
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
//float d = length(uv2.y) + (1.01 - blend) * pow( length(uv2.x), 2.0); // eyeball effect
|
||||
//col *= smoothstep(1.0, 0.9, d);
|
||||
|
||||
float d = length(uv2.y) - blend; //this is the simple version
|
||||
if (d >= -0.04) col*=0.7;
|
||||
if (d >= -0.02) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Z = (gl_FragCoord.xy / Y.zw) * vec2(Y.z/Y.w, 1);
|
||||
|
||||
CurTime= fract(Y.x);
|
||||
|
||||
|
||||
|
||||
CurTime2= CurTime * CurTime;
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
//Kamera sitzt an dieser Position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.2 );
|
||||
//rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
////////////// Shader 1
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.xz= rotate( rayDir.xz, 3.0 );
|
||||
//CurTime2 = CurTime;
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 20.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
////////////// Shader 2
|
||||
p= vec3( -0.0, 177., 166.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -333., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
/*else if( CurScene < 11 ) // <- ersatzkamera fuer Szene 3
|
||||
{
|
||||
p= vec3( -77.0, -122., -177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.8);
|
||||
}*/
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
/*else if( CurScene < 15 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 3.3), 88.0, -44.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 2.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}
|
||||
else if( CurScene < 16 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 0.8 ), 12.0, 99.0);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}*/
|
||||
|
||||
//CurScene= Y.x - fract(Y.x);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
//float t=smoothnoise( rayDir*666.0 )*0.1,y,z;
|
||||
//float t= 0.5 * plasm(999. * rayDir.x, 999. * rayDir.z, 999. * rayDir.y,999. * rayDir.z),y,z;
|
||||
float t= 0.0,y,z;
|
||||
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog =
|
||||
lightSphere(rayDir, LightColor, HitMaterial.zw);// +
|
||||
//lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
while(m++<5-CurScene/4)
|
||||
{
|
||||
//bis zu einer Oberflaeche steppen
|
||||
//for (CurStep=1.0;t<999.0 && CurStep>t*.003;t+=0.01+max(0.0, CurStep),RayStep=rayDir*t )
|
||||
float ii = 111.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,--ii )
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(88., 22., ii);
|
||||
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
|
||||
//Startpunkt und Richtung fuer reflektierten Strahl;
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
// float gradlen = length(n / (2 * CurNormal.x));
|
||||
// float error = abs(gradlen - 1.0);
|
||||
// gl_FragColor.xyz = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), error);
|
||||
// return;
|
||||
|
||||
//CurNormal = vec2(0.0, 0.0);
|
||||
mat(p);
|
||||
//n.xz += CurNormal;
|
||||
n= normalize(n);
|
||||
//CurStep ab hier == Reflektion !!!
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
//float ao(vec3 p, vec3 n, float d, float i) {
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y--)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);//*(1.0-Reflect);
|
||||
cFac*= CurStep;// Reflect * (1.0-t/tmax);
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
//gl_FragColor.xyz = smoothstep(-12.0, -11.8, -Y.x) * mix((cRes + cFac*
|
||||
// ( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
// lightSphere(rayDir, BackColor, HitMaterial.xy))), fog, fogAmount / 2.0);
|
||||
}
|
||||
557
ev16-4k/mark.fs_2_dbg
Normal file
557
ev16-4k/mark.fs_2_dbg
Normal file
@@ -0,0 +1,557 @@
|
||||
// make the whole shader non const after optmizing, because we set this constant before compiling
|
||||
|
||||
|
||||
|
||||
|
||||
int CurScene = 0x0;
|
||||
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Zeit
|
||||
// y: Hoehe
|
||||
// z: Aspec
|
||||
uniform vec4 Y;
|
||||
|
||||
// All data of our world
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;//, CurScene;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
//repeat around y axis w times
|
||||
//void rp(inout vec3 p, float trans, float w)
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
//radius of the torus/ radius of the ring
|
||||
/*float torus(vec3 p,float f)
|
||||
{
|
||||
return length(vec2(length(p.xz) - f,p.y));
|
||||
}*/
|
||||
|
||||
/*float signedDistToBox( vec3 p, vec3 b )
|
||||
{
|
||||
vec3 di = abs(p) - b;
|
||||
float mc = maxcomp(di);
|
||||
return mc<0.0 ? mc : length(max(di,0.0));
|
||||
}*/
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
/*float EndlessBar( vec2 p, float y, float z )
|
||||
{
|
||||
return length( max( abs(p) - vec2(y) + vec2(z), 0.0 ) ) - z;
|
||||
}*/
|
||||
|
||||
/*float noise3D( vec3 p )
|
||||
{
|
||||
return fract( sin( p.x * 151.0 + p.y * 33.0 + p.z ) * 11.0 );
|
||||
}
|
||||
|
||||
float smoothnoise(vec3 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec3 o= smoothstep(0.0,1.0,fract( p ));
|
||||
p= floor( p );
|
||||
|
||||
vec4 n= mix(
|
||||
vec4(
|
||||
noise3D( p+e.yyy),//n000,
|
||||
noise3D( p+e.xyy),//n100,
|
||||
noise3D( p+e.yxy),//n010,
|
||||
noise3D( p+e.xxy)),//n110),
|
||||
vec4(
|
||||
noise3D( p+e.yyx),//n001,
|
||||
noise3D( p+e.xyx),//n101,
|
||||
noise3D( p+e.yxx),//n011,
|
||||
noise3D( p+e.xxx)),//n111),
|
||||
o.z);
|
||||
e = mix(n.xy, n.zw, o.y);
|
||||
return mix(e.x, e.y, o.x);
|
||||
}*/
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 7. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 9. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
vec3 o = p;
|
||||
repeatr(o.xy, 28.0, pi2 / 5.0);
|
||||
r = max( 12. - length(p.xz), max(-CBox(o, vec3(3.0, 8., 8.), 0.5),length(length(p.xy) - 32.) - 2.0));
|
||||
repeatr(p.xy, 34.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 2., length(length(p.xy) - 19.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; ++i)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 - 0.33 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.6 + 0.19 * CurTime );
|
||||
//o.xy= rotate( o.xy, 0.2 + 0.89 * CurTime );
|
||||
float y = 444./s;//(900.0 + 66. * CurTime)/ s;
|
||||
//float y = (800.0 - 388. * CurTime)/ s;
|
||||
//vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250., 105., 0)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105., 210., 231.)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
//CurColor = vec3(1.6,1.7,2.5);
|
||||
//CurStep= .0;
|
||||
CurColor = vec3(224., 228., 204.)/255.;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
/*void ToRes(vec3 Color, float Factor)
|
||||
{
|
||||
cRes+= Color * cFac;
|
||||
cFac*= Factor;
|
||||
}*/
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*pi2 * 0.5)),1.0);
|
||||
|
||||
blend = 1;
|
||||
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
//float d = length(uv2.y) + (1.01 - blend) * pow( length(uv2.x), 2.0); // eyeball effect
|
||||
//col *= smoothstep(1.0, 0.9, d);
|
||||
|
||||
float d = length(uv2.y) - blend; //this is the simple version
|
||||
if (d >= -0.04) col*=0.7;
|
||||
if (d >= -0.02) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Z = (gl_FragCoord.xy / Y.zw) * vec2(Y.z/Y.w, 1);
|
||||
|
||||
CurTime= fract(Y.x);
|
||||
|
||||
CurScene= Y.x - fract(Y.x);
|
||||
|
||||
CurTime2= CurTime * CurTime;
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
//Kamera sitzt an dieser Position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.2 );
|
||||
//rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
////////////// Shader 1
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.xz= rotate( rayDir.xz, 3.0 );
|
||||
//CurTime2 = CurTime;
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 20.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
////////////// Shader 2
|
||||
p= vec3( -0.0, 177., 166.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -333., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
/*else if( CurScene < 11 ) // <- ersatzkamera fuer Szene 3
|
||||
{
|
||||
p= vec3( -77.0, -122., -177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.8);
|
||||
}*/
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
/*else if( CurScene < 15 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 3.3), 88.0, -44.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 2.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}
|
||||
else if( CurScene < 16 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 0.8 ), 12.0, 99.0);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}*/
|
||||
|
||||
//CurScene= Y.x - fract(Y.x);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//Debugzeug fuer Kamerasteuerung
|
||||
if( true )
|
||||
{
|
||||
p.x= gl_ModelViewMatrix[0][0];
|
||||
p.y= gl_ModelViewMatrix[0][1];
|
||||
p.z= gl_ModelViewMatrix[0][2];
|
||||
|
||||
float a1= gl_ModelViewMatrix[1][1];
|
||||
float c1,s1;
|
||||
|
||||
//vec3 q1= vec3((Z.xy - 0.5), 0.6);
|
||||
|
||||
float ScreenHeight = Y.z;
|
||||
float AspectOffset = 1280.0 / 720.0 * 0.5 - 0.5; //= 0.445;
|
||||
|
||||
vec3 q1 = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.6);
|
||||
q1.x -= Y.z;
|
||||
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.y = c1 * q1.y - s1 * q1.z;
|
||||
rayDir.x= q1.x;
|
||||
rayDir.z = s1 * q1.y + c1 * q1.z;
|
||||
|
||||
a1= gl_ModelViewMatrix[1][0];
|
||||
q1=rayDir;
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.x = c1 * q1.x + s1 * q1.z;
|
||||
rayDir.z = -s1 * q1.x + c1 * q1.z;
|
||||
}
|
||||
//Ende Debugzeug fuer Kamerasteuerung
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
//float t=smoothnoise( rayDir*666.0 )*0.1,y,z;
|
||||
//float t= 0.5 * plasm(999. * rayDir.x, 999. * rayDir.z, 999. * rayDir.y,999. * rayDir.z),y,z;
|
||||
float t= 0.0,y,z;
|
||||
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog =
|
||||
lightSphere(rayDir, LightColor, HitMaterial.zw);// +
|
||||
//lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
while(m++<5-CurScene/4)
|
||||
{
|
||||
//bis zu einer Oberflaeche steppen
|
||||
//for (CurStep=1.0;t<999.0 && CurStep>t*.003;t+=0.01+max(0.0, CurStep),RayStep=rayDir*t )
|
||||
float ii = 111.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,--ii )
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(88., 22., ii);
|
||||
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
|
||||
//Startpunkt und Richtung fuer reflektierten Strahl;
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
// float gradlen = length(n / (2 * CurNormal.x));
|
||||
// float error = abs(gradlen - 1.0);
|
||||
// gl_FragColor.xyz = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), error);
|
||||
// return;
|
||||
|
||||
//CurNormal = vec2(0.0, 0.0);
|
||||
mat(p);
|
||||
//n.xz += CurNormal;
|
||||
n= normalize(n);
|
||||
//CurStep ab hier == Reflektion !!!
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
//float ao(vec3 p, vec3 n, float d, float i) {
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y--)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);//*(1.0-Reflect);
|
||||
cFac*= CurStep;// Reflect * (1.0-t/tmax);
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
//gl_FragColor.xyz = smoothstep(-12.0, -11.8, -Y.x) * mix((cRes + cFac*
|
||||
// ( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
// lightSphere(rayDir, BackColor, HitMaterial.xy))), fog, fogAmount / 2.0);
|
||||
}
|
||||
557
ev16-4k/mark.fs_3
Normal file
557
ev16-4k/mark.fs_3
Normal file
@@ -0,0 +1,557 @@
|
||||
// make the whole shader non const after optmizing, because we set this constant before compiling
|
||||
|
||||
const int CurScene = 0x9; // this 0x0 has to be readded, because the optimizer throws it away
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Zeit
|
||||
// y: Hoehe
|
||||
// z: Aspec
|
||||
uniform vec4 Y;
|
||||
|
||||
// All data of our world
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;//, CurScene;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
//repeat around y axis w times
|
||||
//void rp(inout vec3 p, float trans, float w)
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
//radius of the torus/ radius of the ring
|
||||
/*float torus(vec3 p,float f)
|
||||
{
|
||||
return length(vec2(length(p.xz) - f,p.y));
|
||||
}*/
|
||||
|
||||
/*float signedDistToBox( vec3 p, vec3 b )
|
||||
{
|
||||
vec3 di = abs(p) - b;
|
||||
float mc = maxcomp(di);
|
||||
return mc<0.0 ? mc : length(max(di,0.0));
|
||||
}*/
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
/*float EndlessBar( vec2 p, float y, float z )
|
||||
{
|
||||
return length( max( abs(p) - vec2(y) + vec2(z), 0.0 ) ) - z;
|
||||
}*/
|
||||
|
||||
/*float noise3D( vec3 p )
|
||||
{
|
||||
return fract( sin( p.x * 151.0 + p.y * 33.0 + p.z ) * 11.0 );
|
||||
}
|
||||
|
||||
float smoothnoise(vec3 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec3 o= smoothstep(0.0,1.0,fract( p ));
|
||||
p= floor( p );
|
||||
|
||||
vec4 n= mix(
|
||||
vec4(
|
||||
noise3D( p+e.yyy),//n000,
|
||||
noise3D( p+e.xyy),//n100,
|
||||
noise3D( p+e.yxy),//n010,
|
||||
noise3D( p+e.xxy)),//n110),
|
||||
vec4(
|
||||
noise3D( p+e.yyx),//n001,
|
||||
noise3D( p+e.xyx),//n101,
|
||||
noise3D( p+e.yxx),//n011,
|
||||
noise3D( p+e.xxx)),//n111),
|
||||
o.z);
|
||||
e = mix(n.xy, n.zw, o.y);
|
||||
return mix(e.x, e.y, o.x);
|
||||
}*/
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 7. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 9. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
vec3 o = p;
|
||||
repeatr(o.xy, 28.0, pi2 / 5.0);
|
||||
r = max( 12. - length(p.xz), max(-CBox(o, vec3(3.0, 8., 8.), 0.5),length(length(p.xy) - 32.) - 2.0));
|
||||
repeatr(p.xy, 34.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 2., length(length(p.xy) - 19.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; ++i)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 - 0.33 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.6 + 0.19 * CurTime );
|
||||
//o.xy= rotate( o.xy, 0.2 + 0.89 * CurTime );
|
||||
float y = 444./s;//(900.0 + 66. * CurTime)/ s;
|
||||
//float y = (800.0 - 388. * CurTime)/ s;
|
||||
//vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250., 105., 0)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105., 210., 231.)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
//CurColor = vec3(1.6,1.7,2.5);
|
||||
//CurStep= .0;
|
||||
CurColor = vec3(224., 228., 204.)/255.;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
/*void ToRes(vec3 Color, float Factor)
|
||||
{
|
||||
cRes+= Color * cFac;
|
||||
cFac*= Factor;
|
||||
}*/
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*pi2 * 0.5)),1.0);
|
||||
|
||||
|
||||
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
//float d = length(uv2.y) + (1.01 - blend) * pow( length(uv2.x), 2.0); // eyeball effect
|
||||
//col *= smoothstep(1.0, 0.9, d);
|
||||
|
||||
float d = length(uv2.y) - blend; //this is the simple version
|
||||
if (d >= -0.04) col*=0.7;
|
||||
if (d >= -0.02) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Z = (gl_FragCoord.xy / Y.zw) * vec2(Y.z/Y.w, 1);
|
||||
|
||||
CurTime= fract(Y.x);
|
||||
|
||||
|
||||
|
||||
CurTime2= CurTime * CurTime;
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
//Kamera sitzt an dieser Position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.2 );
|
||||
//rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
////////////// Shader 1
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.xz= rotate( rayDir.xz, 3.0 );
|
||||
//CurTime2 = CurTime;
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 20.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
////////////// Shader 2
|
||||
p= vec3( -0.0, 177., 166.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -333., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
/*else if( CurScene < 11 ) // <- ersatzkamera fuer Szene 3
|
||||
{
|
||||
p= vec3( -77.0, -122., -177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.8);
|
||||
}*/
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
/*else if( CurScene < 15 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 3.3), 88.0, -44.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 2.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}
|
||||
else if( CurScene < 16 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 0.8 ), 12.0, 99.0);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}*/
|
||||
|
||||
//CurScene= Y.x - fract(Y.x);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
//float t=smoothnoise( rayDir*666.0 )*0.1,y,z;
|
||||
//float t= 0.5 * plasm(999. * rayDir.x, 999. * rayDir.z, 999. * rayDir.y,999. * rayDir.z),y,z;
|
||||
float t= 0.0,y,z;
|
||||
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog =
|
||||
lightSphere(rayDir, LightColor, HitMaterial.zw);// +
|
||||
//lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
while(m++<5-CurScene/4)
|
||||
{
|
||||
//bis zu einer Oberflaeche steppen
|
||||
//for (CurStep=1.0;t<999.0 && CurStep>t*.003;t+=0.01+max(0.0, CurStep),RayStep=rayDir*t )
|
||||
float ii = 111.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,--ii )
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(88., 22., ii);
|
||||
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
|
||||
//Startpunkt und Richtung fuer reflektierten Strahl;
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
// float gradlen = length(n / (2 * CurNormal.x));
|
||||
// float error = abs(gradlen - 1.0);
|
||||
// gl_FragColor.xyz = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), error);
|
||||
// return;
|
||||
|
||||
//CurNormal = vec2(0.0, 0.0);
|
||||
mat(p);
|
||||
//n.xz += CurNormal;
|
||||
n= normalize(n);
|
||||
//CurStep ab hier == Reflektion !!!
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
//float ao(vec3 p, vec3 n, float d, float i) {
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y--)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);//*(1.0-Reflect);
|
||||
cFac*= CurStep;// Reflect * (1.0-t/tmax);
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
//gl_FragColor.xyz = smoothstep(-12.0, -11.8, -Y.x) * mix((cRes + cFac*
|
||||
// ( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
// lightSphere(rayDir, BackColor, HitMaterial.xy))), fog, fogAmount / 2.0);
|
||||
}
|
||||
557
ev16-4k/mark.fs_3_dbg
Normal file
557
ev16-4k/mark.fs_3_dbg
Normal file
@@ -0,0 +1,557 @@
|
||||
// make the whole shader non const after optmizing, because we set this constant before compiling
|
||||
|
||||
|
||||
|
||||
|
||||
int CurScene = 0x0;
|
||||
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Zeit
|
||||
// y: Hoehe
|
||||
// z: Aspec
|
||||
uniform vec4 Y;
|
||||
|
||||
// All data of our world
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;//, CurScene;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
//repeat around y axis w times
|
||||
//void rp(inout vec3 p, float trans, float w)
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
//radius of the torus/ radius of the ring
|
||||
/*float torus(vec3 p,float f)
|
||||
{
|
||||
return length(vec2(length(p.xz) - f,p.y));
|
||||
}*/
|
||||
|
||||
/*float signedDistToBox( vec3 p, vec3 b )
|
||||
{
|
||||
vec3 di = abs(p) - b;
|
||||
float mc = maxcomp(di);
|
||||
return mc<0.0 ? mc : length(max(di,0.0));
|
||||
}*/
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
/*float EndlessBar( vec2 p, float y, float z )
|
||||
{
|
||||
return length( max( abs(p) - vec2(y) + vec2(z), 0.0 ) ) - z;
|
||||
}*/
|
||||
|
||||
/*float noise3D( vec3 p )
|
||||
{
|
||||
return fract( sin( p.x * 151.0 + p.y * 33.0 + p.z ) * 11.0 );
|
||||
}
|
||||
|
||||
float smoothnoise(vec3 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec3 o= smoothstep(0.0,1.0,fract( p ));
|
||||
p= floor( p );
|
||||
|
||||
vec4 n= mix(
|
||||
vec4(
|
||||
noise3D( p+e.yyy),//n000,
|
||||
noise3D( p+e.xyy),//n100,
|
||||
noise3D( p+e.yxy),//n010,
|
||||
noise3D( p+e.xxy)),//n110),
|
||||
vec4(
|
||||
noise3D( p+e.yyx),//n001,
|
||||
noise3D( p+e.xyx),//n101,
|
||||
noise3D( p+e.yxx),//n011,
|
||||
noise3D( p+e.xxx)),//n111),
|
||||
o.z);
|
||||
e = mix(n.xy, n.zw, o.y);
|
||||
return mix(e.x, e.y, o.x);
|
||||
}*/
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 7. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 9. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
vec3 o = p;
|
||||
repeatr(o.xy, 28.0, pi2 / 5.0);
|
||||
r = max( 12. - length(p.xz), max(-CBox(o, vec3(3.0, 8., 8.), 0.5),length(length(p.xy) - 32.) - 2.0));
|
||||
repeatr(p.xy, 34.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 2., length(length(p.xy) - 19.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; ++i)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 - 0.33 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.6 + 0.19 * CurTime );
|
||||
//o.xy= rotate( o.xy, 0.2 + 0.89 * CurTime );
|
||||
float y = 444./s;//(900.0 + 66. * CurTime)/ s;
|
||||
//float y = (800.0 - 388. * CurTime)/ s;
|
||||
//vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
vec3 r = abs(0.33 - abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250., 105., 0)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105., 210., 231.)/255.;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
//CurColor = vec3(1.6,1.7,2.5);
|
||||
//CurStep= .0;
|
||||
CurColor = vec3(224., 228., 204.)/255.;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
/*void ToRes(vec3 Color, float Factor)
|
||||
{
|
||||
cRes+= Color * cFac;
|
||||
cFac*= Factor;
|
||||
}*/
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*pi2 * 0.5)),1.0);
|
||||
|
||||
blend = 1;
|
||||
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
//float d = length(uv2.y) + (1.01 - blend) * pow( length(uv2.x), 2.0); // eyeball effect
|
||||
//col *= smoothstep(1.0, 0.9, d);
|
||||
|
||||
float d = length(uv2.y) - blend; //this is the simple version
|
||||
if (d >= -0.04) col*=0.7;
|
||||
if (d >= -0.02) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Z = (gl_FragCoord.xy / Y.zw) * vec2(Y.z/Y.w, 1);
|
||||
|
||||
CurTime= fract(Y.x);
|
||||
|
||||
CurScene= Y.x - fract(Y.x);
|
||||
|
||||
CurTime2= CurTime * CurTime;
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
//Kamera sitzt an dieser Position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.2 );
|
||||
//rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
////////////// Shader 1
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
//rayDir.xz= rotate( rayDir.xz, 3.0 );
|
||||
//CurTime2 = CurTime;
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 20.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
////////////// Shader 2
|
||||
p= vec3( -0.0, 177., 166.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -333., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
/*else if( CurScene < 11 ) // <- ersatzkamera fuer Szene 3
|
||||
{
|
||||
p= vec3( -77.0, -122., -177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.8);
|
||||
}*/
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
/*else if( CurScene < 15 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 3.3), 88.0, -44.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 2.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}
|
||||
else if( CurScene < 16 )
|
||||
{
|
||||
p= vec3( -99.0 * (1.0 - CurTime * 0.8 ), 12.0, 99.0);
|
||||
//rayDir.yz= rotate( rayDir.yz, 0.6 + CurTime );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 );
|
||||
CurTime = CurTime * 8.0 + 0.6;
|
||||
CurTime2 = mod( CurTime, 1.0);
|
||||
}*/
|
||||
|
||||
//CurScene= Y.x - fract(Y.x);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//Debugzeug fuer Kamerasteuerung
|
||||
if( true )
|
||||
{
|
||||
p.x= gl_ModelViewMatrix[0][0];
|
||||
p.y= gl_ModelViewMatrix[0][1];
|
||||
p.z= gl_ModelViewMatrix[0][2];
|
||||
|
||||
float a1= gl_ModelViewMatrix[1][1];
|
||||
float c1,s1;
|
||||
|
||||
//vec3 q1= vec3((Z.xy - 0.5), 0.6);
|
||||
|
||||
float ScreenHeight = Y.z;
|
||||
float AspectOffset = 1280.0 / 720.0 * 0.5 - 0.5; //= 0.445;
|
||||
|
||||
vec3 q1 = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.6);
|
||||
q1.x -= Y.z;
|
||||
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.y = c1 * q1.y - s1 * q1.z;
|
||||
rayDir.x= q1.x;
|
||||
rayDir.z = s1 * q1.y + c1 * q1.z;
|
||||
|
||||
a1= gl_ModelViewMatrix[1][0];
|
||||
q1=rayDir;
|
||||
c1 = cos(a1); s1 = sin(a1);
|
||||
rayDir.x = c1 * q1.x + s1 * q1.z;
|
||||
rayDir.z = -s1 * q1.x + c1 * q1.z;
|
||||
}
|
||||
//Ende Debugzeug fuer Kamerasteuerung
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
//float t=smoothnoise( rayDir*666.0 )*0.1,y,z;
|
||||
//float t= 0.5 * plasm(999. * rayDir.x, 999. * rayDir.z, 999. * rayDir.y,999. * rayDir.z),y,z;
|
||||
float t= 0.0,y,z;
|
||||
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog =
|
||||
lightSphere(rayDir, LightColor, HitMaterial.zw);// +
|
||||
//lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
while(m++<5-CurScene/4)
|
||||
{
|
||||
//bis zu einer Oberflaeche steppen
|
||||
//for (CurStep=1.0;t<999.0 && CurStep>t*.003;t+=0.01+max(0.0, CurStep),RayStep=rayDir*t )
|
||||
float ii = 111.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,--ii )
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(88., 22., ii);
|
||||
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
|
||||
//Startpunkt und Richtung fuer reflektierten Strahl;
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
// float gradlen = length(n / (2 * CurNormal.x));
|
||||
// float error = abs(gradlen - 1.0);
|
||||
// gl_FragColor.xyz = mix(vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0), error);
|
||||
// return;
|
||||
|
||||
//CurNormal = vec2(0.0, 0.0);
|
||||
mat(p);
|
||||
//n.xz += CurNormal;
|
||||
n= normalize(n);
|
||||
//CurStep ab hier == Reflektion !!!
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
//float ao(vec3 p, vec3 n, float d, float i) {
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y--)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);//*(1.0-Reflect);
|
||||
cFac*= CurStep;// Reflect * (1.0-t/tmax);
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
//gl_FragColor.xyz = smoothstep(-12.0, -11.8, -Y.x) * mix((cRes + cFac*
|
||||
// ( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
// lightSphere(rayDir, BackColor, HitMaterial.xy))), fog, fogAmount / 2.0);
|
||||
}
|
||||
270
ev16-4k/mark_small.h
Normal file
270
ev16-4k/mark_small.h
Normal file
@@ -0,0 +1,270 @@
|
||||
/* File generated with Shader Minifier 1.1.1
|
||||
* http://www.ctrl-alt-test.fr
|
||||
*/
|
||||
#ifndef MARK_SMALL_H_
|
||||
# define MARK_SMALL_H_
|
||||
# define U_Y "v"
|
||||
|
||||
char mark_fs_0[] = ""
|
||||
"const int z=0x0;"
|
||||
"uniform vec4 v;"
|
||||
"float i,y,f,m,s=6.28319;"
|
||||
"int e;"
|
||||
"vec2 r;"
|
||||
"vec3 l,x,a=vec3(0.),w=vec3(0.),d=vec3(3.,2.5,2.),t=vec3(.7,.6,.4);"
|
||||
"vec4 b;"
|
||||
"vec2 n(vec2 x,float y)"
|
||||
"{"
|
||||
"return cos(y)*x+sin(y)*vec2(-x.y,x.x);"
|
||||
"}"
|
||||
"float n(inout vec2 x,float v,float y)"
|
||||
"{"
|
||||
"float z=atan(x.y,x.x),m=mod(z,y)-y*.5;"
|
||||
"x=length(x)*vec2(cos(m),sin(m));"
|
||||
"x.x-=v;"
|
||||
"return z-m;"
|
||||
"}"
|
||||
"void h(inout float z,float y)"
|
||||
"{"
|
||||
"z=mod(z-y*.5,y)-y*.5;"
|
||||
"}"
|
||||
"void h(inout float z,float y,float x)"
|
||||
"{"
|
||||
"z=max(abs(z)-x,mod(z-y*.5,y)-y*.5);"
|
||||
"}"
|
||||
"float p(float z,float y)"
|
||||
"{"
|
||||
"return floor((z-y*.5)/y);"
|
||||
"}"
|
||||
"float p(in vec3 z,in vec3 y,float x)"
|
||||
"{"
|
||||
"return length(max(abs(z)-y+vec3(x),0.))-x;"
|
||||
"}"
|
||||
"float c(in vec2 z,in vec2 y,float x)"
|
||||
"{"
|
||||
"return length(max(abs(z)-y+vec2(x),0.))-x;"
|
||||
"}"
|
||||
"float c(float z,float y,float x,float i)"
|
||||
"{"
|
||||
"return sin(z+y+i*sin(z+x));"
|
||||
"}"
|
||||
"float o(float y,float z,float x)"
|
||||
"{"
|
||||
"float m=clamp(.5+.5*(z-y)/x,0.,1.);"
|
||||
"return mix(z,y,m)-x*m*(1.-m);"
|
||||
"}"
|
||||
"float c(vec2 z)"
|
||||
"{"
|
||||
"float x=dot(z,vec2(23.2,15.7));"
|
||||
"return fract(sin(x)*232.45);"
|
||||
"}"
|
||||
"float h(vec2 x)"
|
||||
"{"
|
||||
"vec2 z=vec2(1.,0.),m=floor(x),y=fract(x);"
|
||||
"y*=y*(3.-2.*y);"
|
||||
"return-.5+mix(mix(c(m+z.yy),c(m+z.xy),y.x),mix(c(m+z.yx),c(m+z.xx),y.x),y.y);"
|
||||
"}"
|
||||
"float n(vec3 x)"
|
||||
"{"
|
||||
"x.y+=4.*c(1.1,y*7.+x.z*.02,.4,x.z*.02);"
|
||||
"x.x+=4.*c(.9,y*9.+x.z*.02,-1.4,x.z*.02);"
|
||||
"float z=p(x.z,24.);"
|
||||
"h(x.z,24.);"
|
||||
"x.xy=n(x.xy,z+c(1.1,y*4.,1.3,z*.2));"
|
||||
"vec3 v=x;"
|
||||
"n(v.xy,28.,s/5.);"
|
||||
"z=max(12.-length(x.xz),max(-p(v,vec3(3.,8.,8.),.5),length(length(x.xy)-32.)-2.));"
|
||||
"n(x.xy,34.,s/5.);"
|
||||
"return min(z,max(length(x.z)-2.,length(length(x.xy)-19.)-1.));"
|
||||
"}"
|
||||
"float o(vec3 x)"
|
||||
"{"
|
||||
"if(z>7)"
|
||||
"return length(x)-32.-v.w;"
|
||||
"else"
|
||||
" return length(x)-48.-v.w;"
|
||||
"}"
|
||||
"float p(vec3 x)"
|
||||
"{"
|
||||
"if(z>7)"
|
||||
"{"
|
||||
"float i=999.;"
|
||||
"for(float m=0.;m<3.;++m)"
|
||||
"{"
|
||||
"vec3 f=x;"
|
||||
"f.xy=n(f.xy,m+2.3*y);"
|
||||
"f.zx=n(f.zx,2.*m+4.3*y);"
|
||||
"f.z+=48.+8.*c(1.1,y*2.,.4,y*.02);"
|
||||
"f.yz=n(f.yz,m+5.9*y);"
|
||||
"f.xy=n(f.xy,m+2.3*y);"
|
||||
"i=min(i,p(f,vec3(16.,16.,16.)+v.w,3.));"
|
||||
"}"
|
||||
"return max(40.-length(x),o(i,length(x)-34.,24.));"
|
||||
"}"
|
||||
"else"
|
||||
" if(z>3)"
|
||||
"{"
|
||||
"float i=360.-y*222.-x.z;"
|
||||
"i=8.-(i<0.?0.:.001*i*i);"
|
||||
"x.y-=4.*c(1.1,y*2.+x.z*.02,.4,x.z*.02);"
|
||||
"x.x-=4.*c(.9,y*2.+x.z*.02,-1.4,x.z*.02);"
|
||||
"return length(x.xy)-i-v.w;"
|
||||
"}"
|
||||
"else"
|
||||
" return x.z+=192.-96.*y,x.xy=n(x.xy,2.3*y),x.yz=n(x.yz,1.9*y),p(x,vec3(32.,32.,32.)+v.w,0.);"
|
||||
"}"
|
||||
"float u(vec3 x)"
|
||||
"{"
|
||||
"if(z>7)"
|
||||
"{"
|
||||
"float i=p(x,vec3(555.,555.,555.),0.),f=1.;"
|
||||
"vec3 v=x;"
|
||||
"for(int m=0;m<4;m++)"
|
||||
"{"
|
||||
"v.x+=33.;"
|
||||
"v.xz=n(v.xz,1.6-.33*y);"
|
||||
"v.yz=n(v.yz,4.6+.19*y);"
|
||||
"float l=444./f;"
|
||||
"vec3 b=abs(.33-abs(mod(v-l*.5,l)-l*.5));"
|
||||
"i=max(i,111./f-min(max(b.x,b.y),min(max(b.y,b.z),max(b.z,b.x))));"
|
||||
"f*=3.;"
|
||||
"}"
|
||||
"return i;"
|
||||
"}"
|
||||
"else"
|
||||
" if(z>3)"
|
||||
"return n(x);"
|
||||
"else"
|
||||
"{"
|
||||
"float i=n(x.xy,64.,s/48.),m=p(x.z,6.);"
|
||||
"h(x.z,12.);"
|
||||
"i=c(i,y*8.,1.3,m*.2)+.8;"
|
||||
"return length(x)-i;"
|
||||
"}"
|
||||
"}"
|
||||
"float g(vec3 x)"
|
||||
"{"
|
||||
"return min(min(o(x),p(x)),u(x));"
|
||||
"}"
|
||||
"float F(vec3 x)"
|
||||
"{"
|
||||
"return g(x);"
|
||||
"}"
|
||||
"void C(vec3 x)"
|
||||
"{"
|
||||
"b=vec4(-1.8,3.,.6,2.);"
|
||||
"float z=.1;"
|
||||
"if(z>o(x))"
|
||||
"z=o(x),a=vec3(250.,105.,0)/255.,m=.6;"
|
||||
"if(z>p(x))"
|
||||
"z=p(x),a=vec3(105.,210.,231.)/255.,m=.6;"
|
||||
"if(z>u(x))"
|
||||
"a=vec3(224.,228.,204.)/255.,m=.3;"
|
||||
"}"
|
||||
"vec3 C(vec3 x,vec3 z,vec2 y)"
|
||||
"{"
|
||||
"return smoothstep(y.x,y.y,dot(vec3(.86,.5,0.),x))*z;"
|
||||
"}"
|
||||
"vec3 k(vec3 x)"
|
||||
"{"
|
||||
"vec2 z=vec2(gl_FragCoord.xy/v.y);"
|
||||
"z.x-=v.z;"
|
||||
"vec2 y=2*z-1;"
|
||||
"float i=min(8.*abs(sin(v.x*s*.5)),1.);"
|
||||
"x*=.9+.1*sin(10.*v.x+y.x*v.y);"
|
||||
"x*=.9+.1*sin(10.*v.x+y.y*v.y);"
|
||||
"float m=1.5-length(y*2)*.15,f=length(y.y)-i;"
|
||||
"if(f>=-.04)"
|
||||
"x*=.7;"
|
||||
"if(f>=-.02)"
|
||||
"x*=.7;"
|
||||
"return smoothstep(0.,1.,x*m*i)*2.;"
|
||||
"}"
|
||||
"void main()"
|
||||
"{"
|
||||
"y=fract(v.x);"
|
||||
"f=y*y;"
|
||||
"x=vec3(gl_FragCoord.xy/v.y-.5,.8);"
|
||||
"x.x-=v.z;"
|
||||
"vec3 s=vec3(0.,11.,-y*33.);"
|
||||
"if(z<1)"
|
||||
"s=vec3(-44.,-33.,99.),x.yz=n(x.yz,-y),x.xz=n(x.xz,-y);"
|
||||
"else"
|
||||
" if(z<2)"
|
||||
"s=vec3(22.,3.,111.*(1.-y*.3)),x.xz=n(x.xz,3.);"
|
||||
"else"
|
||||
" if(z<3)"
|
||||
"s=vec3(-44.,-33.,-99.),x.yz=n(x.yz,-y),x.xz=n(x.xz,4.5-y);"
|
||||
"else"
|
||||
" if(z<4)"
|
||||
"s=vec3(55.,33.,-155.*(1.-y*.6)),x.yz=n(x.yz,.4),x.xz=n(x.xz,-4.5-y);"
|
||||
"else"
|
||||
" if(z<5)"
|
||||
"s=vec3(11.,0.,-111.),x.xz=n(x.xz,3.);"
|
||||
"else"
|
||||
" if(z<6)"
|
||||
"s=vec3(-18.,-11.,-111.*(1.-y*.3)),x.yz=n(x.yz,-y*.3),x.xz=n(x.xz,-y);"
|
||||
"else"
|
||||
" if(z<7)"
|
||||
"s=vec3(-18.,-11.,144.*(1.-y*.3)),x.yz=n(x.yz,-y*.3),x.xz=n(x.xz,-y);"
|
||||
"else"
|
||||
" if(z<8)"
|
||||
"s=vec3(20.,-11.,111.*(1.-y*.5)),x.yz=n(x.yz,-y*.3),x.xz=n(x.xz,-.3+y*2.);"
|
||||
"else"
|
||||
" if(z<9)"
|
||||
"s=vec3(0.,177.,166.),x.yz=n(x.yz,-.4),x.xz=n(x.xz,3.5*(1.-y*.3));"
|
||||
"else"
|
||||
" if(z<10)"
|
||||
"s=vec3(-333.,153.,-70.),x.yz=n(x.yz,.4),x.xz=n(x.xz,-y);"
|
||||
"else"
|
||||
" if(z<11)"
|
||||
"s=vec3(-66.,44.,0.),x.yz=n(x.yz,.6),x.xz=n(x.xz,4.4);"
|
||||
"else"
|
||||
" s=vec3(-33.,33.*(1.-y),-11.),x.yz=n(x.yz,-.5),x.xz=n(x.xz,-1.);"
|
||||
"x=normalize(x);"
|
||||
"l=vec3(0.,0.,0.);"
|
||||
"i=1.;"
|
||||
"float h=0.,u,p;"
|
||||
"e=0;"
|
||||
"b=vec4(-3.,8.,.9,1.);"
|
||||
"vec3 c=C(x,d,b.zw);"
|
||||
"while(e++<5-z/4)"
|
||||
"{"
|
||||
"float o=111.;"
|
||||
"for(m=1.;o>=0.&&h<999.&&m>h*1e-06;h+=m,w=x*h,--o)"
|
||||
"m=g(s+w);"
|
||||
"if(o<=1)"
|
||||
"{"
|
||||
"o=0.;"
|
||||
"h=999.3;"
|
||||
"w=x*h;"
|
||||
"break;"
|
||||
"}"
|
||||
"o=smoothstep(88.,22.,o);"
|
||||
"vec3 Z=s+w;"
|
||||
"s=Z;"
|
||||
"r=vec2(.04,0.);"
|
||||
"vec3 Y=vec3(F(s+r.xyy)-F(s-r.xyy),F(s+r.yxy)-F(s-r.yxy),F(s+r.yyx)-F(s-r.yyx));"
|
||||
"C(s);"
|
||||
"Y=normalize(Y);"
|
||||
"if(h>999.)"
|
||||
"{"
|
||||
"if(e<2)"
|
||||
"b=vec4(-3.,8.,.9,1.);"
|
||||
"break;"
|
||||
"}"
|
||||
"x=reflect(x,Y);"
|
||||
"u=8.;"
|
||||
"for(p=1.;u>0.;u--)"
|
||||
"p-=.5*(u-g(s+Y*u))/exp2(u);"
|
||||
"a*=p;"
|
||||
"a*=C(x,t,b.xy);"
|
||||
"l+=i*mix(a,c,o);"
|
||||
"i*=m;"
|
||||
"h=.5;"
|
||||
"w=x*h;"
|
||||
"}"
|
||||
"gl_FragColor.xyz=step(-12.,-v.x)*k(l+i*(C(x,d,b.zw)+C(x,t,b.xy)));"
|
||||
"}";
|
||||
|
||||
#endif // MARK_SMALL_H_
|
||||
1616
ev16-4k/patterns.dbg
Normal file
1616
ev16-4k/patterns.dbg
Normal file
File diff suppressed because it is too large
Load Diff
1629
ev16-4k/redist/4klang.asm
Normal file
1629
ev16-4k/redist/4klang.asm
Normal file
File diff suppressed because it is too large
Load Diff
22
ev16-4k/redist/4klang.h
Normal file
22
ev16-4k/redist/4klang.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// some useful song defines for 4klang
|
||||
#define SAMPLE_RATE 44100
|
||||
#define BPM 160.014511
|
||||
#define MAX_INSTRUMENTS 6
|
||||
#define MAX_PATTERNS 100
|
||||
#define PATTERN_SIZE_SHIFT 4
|
||||
#define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
|
||||
#define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
|
||||
#define SAMPLES_PER_TICK 4134
|
||||
#define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
|
||||
#define POLYPHONY 2
|
||||
#define FLOAT_32BIT
|
||||
#define SAMPLE_TYPE float
|
||||
|
||||
#define WINDOWS_OBJECT
|
||||
|
||||
// declaration of the external synth render function, you'll always need that
|
||||
extern "C" void __stdcall _4klang_render(void*);
|
||||
// declaration of the external envelope buffer. access only if you're song was exported with that option
|
||||
extern "C" float _4klang_envelope_buffer;
|
||||
// declaration of the external note buffer. access only if you're song was exported with that option
|
||||
extern "C" int _4klang_note_buffer;
|
||||
810
ev16-4k/redist/4klang.inc
Normal file
810
ev16-4k/redist/4klang.inc
Normal file
@@ -0,0 +1,810 @@
|
||||
%macro export_func 1
|
||||
global _%1
|
||||
_%1:
|
||||
%endmacro
|
||||
%define USE_SECTIONS
|
||||
%define SAMPLE_RATE 44100
|
||||
%define MAX_INSTRUMENTS 6
|
||||
%define MAX_VOICES 2
|
||||
%define HLD 1
|
||||
%define BPM 160.014511
|
||||
%define MAX_PATTERNS 100
|
||||
%define PATTERN_SIZE_SHIFT 4
|
||||
%define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
|
||||
%define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
|
||||
%define SAMPLES_PER_TICK 4134
|
||||
%define DEF_LFO_NORMALIZE 0.0000604741
|
||||
%define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
|
||||
;%define GO4K_USE_16BIT_OUTPUT
|
||||
;%define GO4K_USE_GROOVE_PATTERN
|
||||
%define GO4K_USE_ENVELOPE_RECORDINGS
|
||||
;%define GO4K_USE_NOTE_RECORDINGS
|
||||
%define GO4K_CLIP_OUTPUT
|
||||
%define GO4K_USE_DST
|
||||
%define GO4K_USE_DLL
|
||||
%define GO4K_USE_PAN
|
||||
%define GO4K_USE_GLOBAL_DLL
|
||||
%define GO4K_USE_FSTG
|
||||
%define GO4K_USE_FLD
|
||||
%define GO4K_USE_ENV_CHECK
|
||||
%define GO4K_USE_ENV_MOD_GM
|
||||
%define GO4K_USE_VCO_CHECK
|
||||
%define GO4K_USE_VCO_PHASE_OFFSET
|
||||
%define GO4K_USE_VCO_SHAPE
|
||||
%define GO4K_USE_VCO_MOD_TM
|
||||
%define GO4K_USE_VCO_MOD_CM
|
||||
%define GO4K_USE_VCO_MOD_SM
|
||||
%define GO4K_USE_VCO_STEREO
|
||||
%define GO4K_USE_VCF_CHECK
|
||||
%define GO4K_USE_VCF_HIGH
|
||||
%define GO4K_USE_VCF_BAND
|
||||
%define GO4K_USE_VCF_PEAK
|
||||
%define GO4K_USE_VCF_STEREO
|
||||
%define GO4K_USE_DST_CHECK
|
||||
%define GO4K_USE_DST_STEREO
|
||||
%define GO4K_USE_DLL_CHORUS_CLAMP
|
||||
%define GO4K_USE_DLL_DAMP
|
||||
%define GO4K_USE_DLL_DC_FILTER
|
||||
%define GO4K_USE_FSTG_CHECK
|
||||
%define GO4K_USE_WAVESHAPER_CLIP
|
||||
%define GO4K_USE_FLD_MOD_VM
|
||||
%define MAX_DELAY 65536
|
||||
%define MAX_UNITS 48
|
||||
%define MAX_UNIT_SLOTS 9
|
||||
%define GO4K_BEGIN_CMDDEF(def_name)
|
||||
%define GO4K_END_CMDDEF db 0
|
||||
%define GO4K_BEGIN_PARAMDEF(def_name)
|
||||
%define GO4K_END_PARAMDEF
|
||||
GO4K_ENV_ID equ 1
|
||||
%macro GO4K_ENV 5
|
||||
db %1
|
||||
db %2
|
||||
db %3
|
||||
db %4
|
||||
db %5
|
||||
%endmacro
|
||||
%define ATTAC(val) val
|
||||
%define DECAY(val) val
|
||||
%define SUSTAIN(val) val
|
||||
%define RELEASE(val) val
|
||||
%define GAIN(val) val
|
||||
struc go4kENV_val
|
||||
.attac resd 1
|
||||
.decay resd 1
|
||||
.sustain resd 1
|
||||
.release resd 1
|
||||
.gain resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kENV_wrk
|
||||
.state resd 1
|
||||
.level resd 1
|
||||
.gm resd 1
|
||||
.am resd 1
|
||||
.dm resd 1
|
||||
.sm resd 1
|
||||
.rm resd 1
|
||||
.size
|
||||
endstruc
|
||||
%define ENV_STATE_ATTAC 0
|
||||
%define ENV_STATE_DECAY 1
|
||||
%define ENV_STATE_SUSTAIN 2
|
||||
%define ENV_STATE_RELEASE 3
|
||||
%define ENV_STATE_OFF 4
|
||||
GO4K_VCO_ID equ 2
|
||||
%macro GO4K_VCO 8
|
||||
db %1
|
||||
db %2
|
||||
%ifdef GO4K_USE_VCO_PHASE_OFFSET
|
||||
db %3
|
||||
%endif
|
||||
%ifdef GO4K_USE_VCO_GATE
|
||||
db %4
|
||||
%endif
|
||||
db %5
|
||||
%ifdef GO4K_USE_VCO_SHAPE
|
||||
db %6
|
||||
%endif
|
||||
db %7
|
||||
db %8
|
||||
%endmacro
|
||||
%define TRANSPOSE(val) val
|
||||
%define DETUNE(val) val
|
||||
%define PHASE(val) val
|
||||
%define GATES(val) val
|
||||
%define COLOR(val) val
|
||||
%define SHAPE(val) val
|
||||
%define FLAGS(val) val
|
||||
%define SINE 0x01
|
||||
%define TRISAW 0x02
|
||||
%define PULSE 0x04
|
||||
%define NOISE 0x08
|
||||
%define LFO 0x10
|
||||
%define GATE 0x20
|
||||
%define VCO_STEREO 0x40
|
||||
struc go4kVCO_val
|
||||
.transpose resd 1
|
||||
.detune resd 1
|
||||
%ifdef GO4K_USE_VCO_PHASE_OFFSET
|
||||
.phaseofs resd 1
|
||||
%endif
|
||||
%ifdef GO4K_USE_VCO_GATE
|
||||
.gate resd 1
|
||||
%endif
|
||||
.color resd 1
|
||||
%ifdef GO4K_USE_VCO_SHAPE
|
||||
.shape resd 1
|
||||
%endif
|
||||
.gain resd 1
|
||||
.flags resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kVCO_wrk
|
||||
.phase resd 1
|
||||
.tm resd 1
|
||||
.dm resd 1
|
||||
.fm resd 1
|
||||
.pm resd 1
|
||||
.cm resd 1
|
||||
.sm resd 1
|
||||
.gm resd 1
|
||||
.phase2 resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_VCF_ID equ 3
|
||||
%macro GO4K_VCF 3
|
||||
db %1
|
||||
db %2
|
||||
db %3
|
||||
%endmacro
|
||||
%define LOWPASS 0x1
|
||||
%define HIGHPASS 0x2
|
||||
%define BANDPASS 0x4
|
||||
%define BANDSTOP 0x3
|
||||
%define ALLPASS 0x7
|
||||
%define PEAK 0x8
|
||||
%define STEREO 0x10
|
||||
%define FREQUENCY(val) val
|
||||
%define RESONANCE(val) val
|
||||
%define VCFTYPE(val) val
|
||||
struc go4kVCF_val
|
||||
.freq resd 1
|
||||
.res resd 1
|
||||
.type resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kVCF_wrk
|
||||
.low resd 1
|
||||
.high resd 1
|
||||
.band resd 1
|
||||
.freq resd 1
|
||||
.fm resd 1
|
||||
.rm resd 1
|
||||
.low2 resd 1
|
||||
.high2 resd 1
|
||||
.band2 resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_DST_ID equ 4
|
||||
%macro GO4K_DST 3
|
||||
db %1
|
||||
%ifdef GO4K_USE_DST_SH
|
||||
db %2
|
||||
%ifdef GO4K_USE_DST_STEREO
|
||||
db %3
|
||||
%endif
|
||||
%else
|
||||
%ifdef GO4K_USE_DST_STEREO
|
||||
db %3
|
||||
%endif
|
||||
%endif
|
||||
%endmacro
|
||||
%define DRIVE(val) val
|
||||
%define SNHFREQ(val) val
|
||||
%define FLAGS(val) val
|
||||
struc go4kDST_val
|
||||
.drive resd 1
|
||||
%ifdef GO4K_USE_DST_SH
|
||||
.snhfreq resd 1
|
||||
%endif
|
||||
.flags resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kDST_wrk
|
||||
.out resd 1
|
||||
.snhphase resd 1
|
||||
.dm resd 1
|
||||
.sm resd 1
|
||||
.out2 resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_DLL_ID equ 5
|
||||
%macro GO4K_DLL 8
|
||||
db %1
|
||||
db %2
|
||||
db %3
|
||||
%ifdef GO4K_USE_DLL_DAMP
|
||||
db %4
|
||||
%endif
|
||||
%ifdef GO4K_USE_DLL_CHORUS
|
||||
db %5
|
||||
db %6
|
||||
%endif
|
||||
db %7
|
||||
db %8
|
||||
%endmacro
|
||||
%define PREGAIN(val) val
|
||||
%define DRY(val) val
|
||||
%define FEEDBACK(val) val
|
||||
%define DEPTH(val) val
|
||||
%define DAMP(val) val
|
||||
%define DELAY(val) val
|
||||
%define COUNT(val) val
|
||||
struc go4kDLL_val
|
||||
.pregain resd 1
|
||||
.dry resd 1
|
||||
.feedback resd 1
|
||||
%ifdef GO4K_USE_DLL_DAMP
|
||||
.damp resd 1
|
||||
%endif
|
||||
%ifdef GO4K_USE_DLL_CHORUS
|
||||
.freq resd 1
|
||||
.depth
|
||||
%endif
|
||||
.delay resd 1
|
||||
.count resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kDLL_wrk
|
||||
.index resd 1
|
||||
.store resd 1
|
||||
.dcin resd 1
|
||||
.dcout resd 1
|
||||
%ifdef GO4K_USE_DLL_CHORUS
|
||||
.phase resd 1
|
||||
%endif
|
||||
.buffer resd MAX_DELAY
|
||||
.size
|
||||
endstruc
|
||||
struc go4kDLL_wrk2
|
||||
.pm resd 1
|
||||
.fm resd 1
|
||||
.im resd 1
|
||||
.dm resd 1
|
||||
.sm resd 1
|
||||
.am resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_FOP_ID equ 6
|
||||
%macro GO4K_FOP 1
|
||||
db %1
|
||||
%endmacro
|
||||
%define OP(val) val
|
||||
%define FOP_POP 0x1
|
||||
%define FOP_ADDP 0x2
|
||||
%define FOP_MULP 0x3
|
||||
%define FOP_PUSH 0x4
|
||||
%define FOP_XCH 0x5
|
||||
%define FOP_ADD 0x6
|
||||
%define FOP_MUL 0x7
|
||||
%define FOP_ADDP2 0x8
|
||||
%define FOP_LOADNOTE 0x9
|
||||
%define FOP_MULP2 0xa
|
||||
struc go4kFOP_val
|
||||
.flags resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFOP_wrk
|
||||
.size
|
||||
endstruc
|
||||
GO4K_FST_ID equ 7
|
||||
%macro GO4K_FST 2
|
||||
db %1
|
||||
dw %2
|
||||
%endmacro
|
||||
%define AMOUNT(val) val
|
||||
%define DEST(val) val
|
||||
%define FST_SET 0x0000
|
||||
%define FST_ADD 0x4000
|
||||
%define FST_POP 0x8000
|
||||
struc go4kFST_val
|
||||
.amount resd 1
|
||||
.op1 resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFST_wrk
|
||||
.size
|
||||
endstruc
|
||||
GO4K_PAN_ID equ 8
|
||||
%macro GO4K_PAN 1
|
||||
%ifdef GO4K_USE_PAN
|
||||
db %1
|
||||
%endif
|
||||
%endmacro
|
||||
%define PANNING(val) val
|
||||
struc go4kPAN_val
|
||||
%ifdef GO4K_USE_PAN
|
||||
.panning resd 1
|
||||
%endif
|
||||
.size
|
||||
endstruc
|
||||
struc go4kPAN_wrk
|
||||
.pm resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_OUT_ID equ 9
|
||||
%macro GO4K_OUT 2
|
||||
db %1
|
||||
%ifdef GO4K_USE_GLOBAL_DLL
|
||||
db %2
|
||||
%endif
|
||||
%endmacro
|
||||
%define AUXSEND(val) val
|
||||
struc go4kOUT_val
|
||||
.gain resd 1
|
||||
%ifdef GO4K_USE_GLOBAL_DLL
|
||||
.auxsend resd 1
|
||||
%endif
|
||||
.size
|
||||
endstruc
|
||||
struc go4kOUT_wrk
|
||||
.am resd 1
|
||||
.gm resd 1
|
||||
.size
|
||||
endstruc
|
||||
GO4K_ACC_ID equ 10
|
||||
%macro GO4K_ACC 1
|
||||
db %1
|
||||
%endmacro
|
||||
%define OUTPUT 0
|
||||
%define AUX 8
|
||||
%define ACCTYPE(val) val
|
||||
struc go4kACC_val
|
||||
.acctype resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kACC_wrk
|
||||
.size
|
||||
endstruc
|
||||
%ifdef GO4K_USE_FLD
|
||||
GO4K_FLD_ID equ 11
|
||||
%macro GO4K_FLD 1
|
||||
db %1
|
||||
%endmacro
|
||||
%define VALUE(val) val
|
||||
struc go4kFLD_val
|
||||
.value resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFLD_wrk
|
||||
.vm resd 1
|
||||
.size
|
||||
endstruc
|
||||
%endif
|
||||
%ifdef GO4K_USE_FSTG
|
||||
GO4K_FSTG_ID equ 12
|
||||
%macro GO4K_FSTG 2
|
||||
db %1
|
||||
dw %2
|
||||
%endmacro
|
||||
struc go4kFSTG_val
|
||||
.amount resd 1
|
||||
.op1 resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4kFSTG_wrk
|
||||
.size
|
||||
endstruc
|
||||
%endif
|
||||
struc go4k_instrument
|
||||
.release resd 1
|
||||
.note resd 1
|
||||
.workspace resd MAX_UNITS*MAX_UNIT_SLOTS
|
||||
.dlloutl resd 1
|
||||
.dlloutr resd 1
|
||||
.outl resd 1
|
||||
.outr resd 1
|
||||
.size
|
||||
endstruc
|
||||
struc go4k_synth
|
||||
.instruments resb go4k_instrument.size * MAX_INSTRUMENTS * MAX_VOICES
|
||||
.global resb go4k_instrument.size * MAX_VOICES
|
||||
.size
|
||||
endstruc
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc1 data align=1
|
||||
%else
|
||||
section .data align=1
|
||||
%endif
|
||||
go4k_patterns
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 36, 48, 60, 72, 74, HLD, 75, HLD, 60, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 36, 48, 60, 72, 75, HLD, 79, HLD, 60, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 36, 48, 60, 72, 80, HLD, 79, HLD, 60, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 48, 60, 72, 84, 92, HLD, 91, HLD, 72, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 91, 87, 84, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 89, 86, 82, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 87, 84, 80, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 72, 75, 79, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 48, 60, 72, 84, 86, HLD, 87, HLD, 72, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 48, 60, 72, 84, 87, HLD, 91, HLD, 72, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 43, 55, 67, 79, 92, HLD, 91, HLD, 67, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 91, 87, 84, 79, 91, 87, 84, 79, 91, 87, 84, 79, 91, 87, 84, 79,
|
||||
db 92, 87, 84, 80, 92, 87, 84, 80, 92, 87, 84, 80, 92, 87, 84, 80,
|
||||
db 92, 89, 86, 83, 92, 89, 86, 83, 92, 89, 86, 83, 92, 89, 86, 83,
|
||||
db 91, 86, 84, 79, 91, 86, 84, 79, 89, 86, 83, 79, 89, 86, 83, 79,
|
||||
db 92, 89, 86, 83, 80, 77, 74, 71, 68, 65, 62, 59, 56, 53, 50, 47,
|
||||
db 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 91, 89, 86, 83, 79, 77, 74, 71, 67, 65, 62, 59, 55, 53, 50, 47,
|
||||
db 60, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 60, HLD, HLD, HLD, HLD, HLD,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, HLD, 0, 0, 0, 0,
|
||||
db 60, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 60, HLD, 0, 0, 0, 0,
|
||||
db 60, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 60, HLD, HLD, HLD, 60, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 60, HLD, HLD, HLD, HLD, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 60, HLD, 0, 0, 0, 0,
|
||||
db 60, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 60, HLD, HLD, HLD, 60, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 67, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 67, HLD, HLD, HLD,
|
||||
db 0, 0, 0, 0, 67, HLD, HLD, HLD, HLD, HLD, 0, 0, 67, HLD, HLD, HLD,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 67, HLD, 0, 0, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 67, HLD, 0, 0, 67, HLD, 67, HLD,
|
||||
db 0, 0, 0, 0, 67, HLD, HLD, HLD, 67, HLD, 0, 0, 0, 0, 0, 0,
|
||||
db 67, HLD, 67, HLD, HLD, HLD, 67, HLD, 67, HLD, 0, 0, 67, HLD, 67, HLD,
|
||||
db 84, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db 48, HLD, HLD, HLD, 0, 0, 0, 0, 36, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db 44, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 44, HLD, 56, HLD, 44, HLD,
|
||||
db HLD, HLD, 43, HLD, 55, HLD, HLD, HLD, 43, HLD, HLD, HLD, 0, 0, 0, 0,
|
||||
db 0, 0, 41, HLD, HLD, HLD, HLD, HLD, 0, 0, 53, HLD, 41, HLD, 53, HLD,
|
||||
db HLD, HLD, 48, HLD, 60, HLD, 36, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0,
|
||||
db 48, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 60, HLD, 0, 0,
|
||||
db 0, 0, 0, 0, 36, HLD, HLD, HLD, 48, HLD, 36, HLD, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 48, HLD, HLD, HLD, HLD, HLD, 36, HLD, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 41, HLD, HLD, HLD, 53, HLD, 41, HLD, 0, 0, 0, 0,
|
||||
db 43, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 55, HLD, 0, 0,
|
||||
db 0, 0, 0, 0, 55, HLD, HLD, HLD, HLD, HLD, 79, HLD, 67, HLD, 0, 0,
|
||||
db 0, 0, 0, 0, 55, HLD, HLD, HLD, HLD, HLD, 67, HLD, 0, 0, 0, 0,
|
||||
db 55, HLD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, HLD, 74, HLD,
|
||||
db 75, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 74, HLD, 75, HLD,
|
||||
db 77, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 72, HLD, HLD, HLD,
|
||||
db 71, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 71, HLD, 72, HLD,
|
||||
db 74, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 79, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db 75, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 75, HLD, HLD, HLD,
|
||||
db 77, HLD, 0, 0, 77, HLD, 80, HLD, HLD, HLD, 77, HLD, HLD, HLD, HLD, HLD,
|
||||
db 79, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD, HLD,
|
||||
db HLD, HLD, HLD, HLD, 83, HLD, 86, HLD, HLD, HLD, HLD, HLD, 79, HLD, HLD, HLD,
|
||||
db 79, HLD, 0, 0, 77, HLD, 80, HLD, HLD, HLD, 77, HLD, HLD, HLD, HLD, HLD,
|
||||
db 79, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
go4k_patterns_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc2 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
go4k_pattern_lists
|
||||
Instrument0List db 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 10, 9, 4, 9, 10, 9, 11, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 14, 15, 16, 17, 1, 2, 1, 3, 1, 2, 1, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9, 10, 9, 4, 9, 10, 9, 11, 12, 13, 14, 15, 12, 13, 14, 18, 1, 0, 0, 0,
|
||||
Instrument1List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 22, 23, 22, 23, 22, 23, 22, 24, 22, 23, 22, 23, 22, 23, 22, 24, 22, 23, 22, 24, 22, 23, 22, 24, 22, 23, 22, 24, 25, 20, 19, 20, 22, 23, 22, 23, 22, 23, 22, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 22, 23, 22, 24, 22, 23, 25, 20, 22, 26, 0, 0,
|
||||
Instrument2List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 29, 29, 29, 29, 29, 29, 29, 30, 29, 29, 29, 29, 29, 29, 29, 30, 29, 29, 29, 30, 29, 29, 29, 30, 29, 29, 29, 30, 31, 32, 0, 27, 29, 29, 29, 29, 29, 29, 29, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 29, 29, 29, 30, 29, 29, 31, 32, 29, 0, 0, 0,
|
||||
Instrument3List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 34, 33, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
Instrument4List db 0, 0, 0, 0, 35, 0, 35, 0, 35, 0, 35, 0, 35, 0, 35, 0, 36, 37, 38, 39, 36, 37, 38, 39, 36, 39, 38, 37, 36, 39, 38, 37, 40, 41, 40, 42, 40, 43, 44, 45, 40, 43, 44, 46, 40, 43, 44, 46, 40, 43, 44, 46, 40, 43, 44, 46, 40, 43, 44, 46, 44, 46, 0, 47, 35, 0, 35, 0, 35, 0, 35, 0, 36, 37, 38, 39, 36, 37, 38, 39, 36, 39, 38, 37, 36, 39, 38, 37, 40, 43, 44, 45, 40, 43, 44, 46, 35, 0, 0, 0,
|
||||
Instrument5List db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 49, 50, 51, 52, 53, 54, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
go4k_pattern_lists_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc3 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
go4k_synth_instructions
|
||||
GO4K_BEGIN_CMDDEF(Instrument0)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument1)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FSTG_ID
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument2)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument3)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument4)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Instrument5)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_FST_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCO_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
GO4K_BEGIN_CMDDEF(Global)
|
||||
db GO4K_ACC_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_DLL_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_ACC_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_VCF_ID
|
||||
db GO4K_DST_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
go4k_synth_instructions_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc4 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
go4k_synth_parameter_values
|
||||
GO4K_BEGIN_PARAMDEF(Instrument0)
|
||||
GO4K_ENV ATTAC(32),DECAY(64),SUSTAIN(0),RELEASE(64),GAIN(72)
|
||||
GO4K_FST AMOUNT(128),DEST(13*MAX_UNIT_SLOTS+0+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(40),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(66),DEST(9*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(32),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(56),DEST(8*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(48),DETUNE(64),PHASE(0),GATES(0),COLOR(64),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(80),DEST(11*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(76),DETUNE(62),PHASE(48),GATES(0),COLOR(32),SHAPE(40),GAIN(128),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_VCO TRANSPOSE(76),DETUNE(68),PHASE(0),GATES(0),COLOR(112),SHAPE(8),GAIN(64),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(72),PHASE(96),GATES(0),COLOR(120),SHAPE(96),GAIN(32),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_FLD VALUE(64)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP2)
|
||||
GO4K_VCF FREQUENCY(96),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(64),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(17),COUNT(1)
|
||||
GO4K_FOP OP(FOP_XCH)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(64),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(17),COUNT(1)
|
||||
GO4K_OUT GAIN(32), AUXSEND(48)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument1)
|
||||
GO4K_ENV ATTAC(16),DECAY(64),SUSTAIN(0),RELEASE(72),GAIN(128)
|
||||
GO4K_FST AMOUNT(112),DEST(0*MAX_UNIT_SLOTS+2+FST_SET)
|
||||
GO4K_FSTG AMOUNT(32),DEST((4*go4k_instrument.size*MAX_VOICES/4)+(0*MAX_UNIT_SLOTS+2)+(go4k_instrument.workspace/4)+FST_ADD)
|
||||
GO4K_ENV ATTAC(0),DECAY(56),SUSTAIN(0),RELEASE(0),GAIN(128)
|
||||
GO4K_DST DRIVE(32), SNHFREQ(128), FLAGS(0)
|
||||
GO4K_FST AMOUNT(88),DEST(7*MAX_UNIT_SLOTS+1+FST_SET)
|
||||
GO4K_FOP OP(FOP_POP)
|
||||
GO4K_VCO TRANSPOSE(52),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(64),GAIN(128),FLAGS(SINE)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_PAN PANNING(64)
|
||||
GO4K_OUT GAIN(128), AUXSEND(0)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument2)
|
||||
GO4K_ENV ATTAC(16),DECAY(72),SUSTAIN(0),RELEASE(72),GAIN(128)
|
||||
GO4K_FST AMOUNT(128),DEST(0*MAX_UNIT_SLOTS+2+FST_SET)
|
||||
GO4K_ENV ATTAC(0),DECAY(56),SUSTAIN(0),RELEASE(0),GAIN(128)
|
||||
GO4K_FST AMOUNT(108),DEST(6*MAX_UNIT_SLOTS+1+FST_SET)
|
||||
GO4K_FST AMOUNT(72),DEST(7*MAX_UNIT_SLOTS+1+FST_SET)
|
||||
GO4K_FOP OP(FOP_POP)
|
||||
GO4K_VCO TRANSPOSE(32),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(32),GAIN(128),FLAGS(SINE)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(85),COLOR(128),SHAPE(80),GAIN(64),FLAGS(SINE)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(85),COLOR(64),SHAPE(64),GAIN(64),FLAGS(NOISE)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(96),VCFTYPE(LOWPASS)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_VCF FREQUENCY(24),RESONANCE(32),VCFTYPE(HIGHPASS)
|
||||
GO4K_DST DRIVE(16), SNHFREQ(128), FLAGS(0)
|
||||
GO4K_PAN PANNING(72)
|
||||
GO4K_OUT GAIN(96), AUXSEND(24)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument3)
|
||||
GO4K_ENV ATTAC(0),DECAY(128),SUSTAIN(128),RELEASE(0),GAIN(96)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(0),COLOR(0),SHAPE(64),GAIN(84),FLAGS(NOISE)
|
||||
GO4K_VCF FREQUENCY(96),RESONANCE(128),VCFTYPE(BANDPASS)
|
||||
GO4K_VCO TRANSPOSE(76),DETUNE(64),PHASE(0),GATES(51),COLOR(0),SHAPE(32),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_VCO TRANSPOSE(52),DETUNE(64),PHASE(64),GATES(51),COLOR(0),SHAPE(64),GAIN(64),FLAGS(TRISAW|LFO)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(64),PHASE(0),GATES(51),COLOR(0),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_ADDP)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_DST DRIVE(32), SNHFREQ(128), FLAGS(0)
|
||||
GO4K_DLL PREGAIN(72),DRY(128),FEEDBACK(128),DAMP(128),FREQUENCY(0),DEPTH(0),DELAY(18),COUNT(1)
|
||||
GO4K_VCF FREQUENCY(128),RESONANCE(32),VCFTYPE(PEAK)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_PAN PANNING(72)
|
||||
GO4K_OUT GAIN(8), AUXSEND(4)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument4)
|
||||
GO4K_ENV ATTAC(0),DECAY(64),SUSTAIN(64),RELEASE(64),GAIN(128)
|
||||
GO4K_VCO TRANSPOSE(80),DETUNE(64),PHASE(0),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(96),DEST(0*MAX_UNIT_SLOTS+2+FST_SET+FST_POP)
|
||||
GO4K_FST AMOUNT(128),DEST(15*MAX_UNIT_SLOTS+0+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(72),PHASE(48),GATES(0),COLOR(96),SHAPE(64),GAIN(64),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(60),PHASE(16),GATES(0),COLOR(96),SHAPE(32),GAIN(128),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_DST DRIVE(127), SNHFREQ(128), FLAGS(STEREO)
|
||||
GO4K_VCF FREQUENCY(128),RESONANCE(48),VCFTYPE(BANDSTOP|STEREO)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(62),PHASE(96),GATES(0),COLOR(128),SHAPE(16),GAIN(128),FLAGS(SINE|VCO_STEREO)
|
||||
GO4K_VCF FREQUENCY(72),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(76),PHASE(96),GATES(0),COLOR(16),SHAPE(112),GAIN(128),FLAGS(SINE|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_FLD VALUE(64)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP2)
|
||||
GO4K_OUT GAIN(32), AUXSEND(24)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Instrument5)
|
||||
GO4K_ENV ATTAC(32),DECAY(96),SUSTAIN(0),RELEASE(32),GAIN(64)
|
||||
GO4K_VCO TRANSPOSE(48),DETUNE(64),PHASE(0),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(128),DEST(6*MAX_UNIT_SLOTS+5+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(52),DETUNE(64),PHASE(32),GATES(0),COLOR(128),SHAPE(64),GAIN(128),FLAGS(TRISAW|LFO)
|
||||
GO4K_FST AMOUNT(128),DEST(7*MAX_UNIT_SLOTS+6+FST_SET+FST_POP)
|
||||
GO4K_FST AMOUNT(128),DEST(17*MAX_UNIT_SLOTS+0+FST_SET+FST_POP)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(72),PHASE(48),GATES(0),COLOR(96),SHAPE(64),GAIN(64),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(60),PHASE(16),GATES(0),COLOR(96),SHAPE(32),GAIN(128),FLAGS(TRISAW|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_DST DRIVE(127), SNHFREQ(128), FLAGS(STEREO)
|
||||
GO4K_VCF FREQUENCY(128),RESONANCE(48),VCFTYPE(BANDSTOP|STEREO)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(62),PHASE(96),GATES(0),COLOR(128),SHAPE(16),GAIN(128),FLAGS(PULSE|VCO_STEREO)
|
||||
GO4K_VCF FREQUENCY(112),RESONANCE(128),VCFTYPE(LOWPASS|STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCO TRANSPOSE(64),DETUNE(76),PHASE(96),GATES(0),COLOR(16),SHAPE(112),GAIN(128),FLAGS(SINE|VCO_STEREO)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_FLD VALUE(64)
|
||||
GO4K_FOP OP(FOP_PUSH)
|
||||
GO4K_FOP OP(FOP_MULP2)
|
||||
GO4K_OUT GAIN(32), AUXSEND(24)
|
||||
GO4K_END_PARAMDEF
|
||||
GO4K_BEGIN_PARAMDEF(Global)
|
||||
GO4K_ACC ACCTYPE(AUX)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(96),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(1),COUNT(8)
|
||||
GO4K_FOP OP(FOP_XCH)
|
||||
GO4K_DLL PREGAIN(64),DRY(128),FEEDBACK(96),DAMP(64),FREQUENCY(0),DEPTH(0),DELAY(9),COUNT(8)
|
||||
GO4K_FOP OP(FOP_XCH)
|
||||
GO4K_ACC ACCTYPE(OUTPUT)
|
||||
GO4K_FOP OP(FOP_ADDP2)
|
||||
GO4K_VCF FREQUENCY(4),RESONANCE(64),VCFTYPE(HIGHPASS|STEREO)
|
||||
GO4K_DST DRIVE(64), SNHFREQ(128), FLAGS(STEREO)
|
||||
GO4K_OUT GAIN(88), AUXSEND(0)
|
||||
GO4K_END_PARAMDEF
|
||||
go4k_synth_parameter_values_end
|
||||
%ifdef USE_SECTIONS
|
||||
section .g4kmuc5 data align=1
|
||||
%else
|
||||
section .data
|
||||
%endif
|
||||
%ifdef GO4K_USE_DLL
|
||||
global _go4k_delay_times
|
||||
_go4k_delay_times
|
||||
dw 0
|
||||
dw 1116
|
||||
dw 1188
|
||||
dw 1276
|
||||
dw 1356
|
||||
dw 1422
|
||||
dw 1492
|
||||
dw 1556
|
||||
dw 1618
|
||||
dw 1140
|
||||
dw 1212
|
||||
dw 1300
|
||||
dw 1380
|
||||
dw 1446
|
||||
dw 1516
|
||||
dw 1580
|
||||
dw 1642
|
||||
dw 16536
|
||||
dw 4134
|
||||
%endif
|
||||
BIN
ev16-4k/redist/4klang.obj
Normal file
BIN
ev16-4k/redist/4klang.obj
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bf-detached-src.zip
Normal file
BIN
ev16-4k/redist/bf-detached-src.zip
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Compress (slow)/intro2k15.exe
Normal file
BIN
ev16-4k/redist/bin/Compress (slow)/intro2k15.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Compress (slow)/intro2k15.pdb
Normal file
BIN
ev16-4k/redist/bin/Compress (slow)/intro2k15.pdb
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Release/intro2k15.exe
Normal file
BIN
ev16-4k/redist/bin/Release/intro2k15.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Release/intro2k15.iobj
Normal file
BIN
ev16-4k/redist/bin/Release/intro2k15.iobj
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Release/intro2k15.ipdb
Normal file
BIN
ev16-4k/redist/bin/Release/intro2k15.ipdb
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/Release/intro2k15.pdb
Normal file
BIN
ev16-4k/redist/bin/Release/intro2k15.pdb
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1024x768.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1024x768.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1280x1024.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1280x1024.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1280x720.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1280x720.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1366x768.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1366x768.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1400x1050.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1400x1050.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1440x900.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1440x900.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1600x1200.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1600x1200.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1600x900.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1600x900.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1680x1050.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1680x1050.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1920x1080.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1920x1080.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_1920x1200.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_1920x1200.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_640x480.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_640x480.exe
Normal file
Binary file not shown.
BIN
ev16-4k/redist/bin/party/bf-detached_800x600.exe
Normal file
BIN
ev16-4k/redist/bin/party/bf-detached_800x600.exe
Normal file
Binary file not shown.
2
ev16-4k/redist/build.bat
Normal file
2
ev16-4k/redist/build.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
cl /c /GS- /Qpar- /analyze- /W0 /Gy- /Zc:wchar_t /Gm- /O1 /Ob2 /Fd"obj/party/vc140.pdb" /fp:fast /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "SCREENWIDTH"=%1 /D "SCREENHEIGHT"=%2 /errorReport:prompt /WX- /Zc:forScope /GR- /arch:IA32 /Gz /Oy /Oi /MT /Fa"obj/party/" /nologo /Fo"obj/party/" /Os /Fp"obj/party/intro.pch" main.compress.cpp
|
||||
link /OUT:"bin/party/bf-detached_%1x%2.exe" "opengl32.lib" "winmm.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "obj/party/main.compress.obj" "4klang.obj" /ENTRY:"main" /SUBSYSTEM:WINDOWS /CRINKLER /COMPMODE:FAST /REPORT:report.html /RANGE:opengl32
|
||||
25
ev16-4k/redist/buildall.bat
Normal file
25
ev16-4k/redist/buildall.bat
Normal file
@@ -0,0 +1,25 @@
|
||||
@echo off
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
|
||||
mkdir bin\party
|
||||
mkdir obj\party
|
||||
|
||||
REM 16:9
|
||||
call build 1280 720
|
||||
call build 1366 768
|
||||
call build 1600 900
|
||||
call build 1920 1080
|
||||
|
||||
REM 16:10
|
||||
call build 1440 900
|
||||
call build 1680 1050
|
||||
call build 1920 1200
|
||||
|
||||
REM 4:3
|
||||
call build 640 480
|
||||
call build 800 600
|
||||
call build 1024 768
|
||||
call build 1400 1050
|
||||
call build 1600 1200
|
||||
|
||||
REM 5:4
|
||||
call build 1280 1024
|
||||
1
ev16-4k/redist/do_minify.bat
Normal file
1
ev16-4k/redist/do_minify.bat
Normal file
@@ -0,0 +1 @@
|
||||
shader_minifier.exe "intro.fs" -o intro_small.h -v
|
||||
BIN
ev16-4k/redist/evk16_4k.VC.db
Normal file
BIN
ev16-4k/redist/evk16_4k.VC.db
Normal file
Binary file not shown.
34
ev16-4k/redist/evk16_4k.sln
Normal file
34
ev16-4k/redist/evk16_4k.sln
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intro2k15", "intro2k15.vcxproj", "{DE5F7702-06F1-44F7-8823-87A60E4990BE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Compress (Slow)|Win32 = Compress (Slow)|Win32
|
||||
Compress (Slow)|x64 = Compress (Slow)|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Video|Win32 = Video|Win32
|
||||
Video|x64 = Video|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Compress (Slow)|Win32.ActiveCfg = Compress (slow)|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Compress (Slow)|Win32.Build.0 = Compress (slow)|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Compress (Slow)|x64.ActiveCfg = Release|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Compress (Slow)|x64.Build.0 = Release|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Release|Win32.Build.0 = Release|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Release|x64.ActiveCfg = Release|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Release|x64.Build.0 = Release|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Video|Win32.ActiveCfg = Video|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Video|Win32.Build.0 = Video|Win32
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Video|x64.ActiveCfg = Video|x64
|
||||
{DE5F7702-06F1-44F7-8823-87A60E4990BE}.Video|x64.Build.0 = Video|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
13146
ev16-4k/redist/glext.h
Normal file
13146
ev16-4k/redist/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
399
ev16-4k/redist/intro.fs
Normal file
399
ev16-4k/redist/intro.fs
Normal file
@@ -0,0 +1,399 @@
|
||||
// make the whole shader non-const after minifying, because we set this constant before compiling
|
||||
|
||||
const int CurScene = 0x0; // this 0x0 has to be readded, because the optimizer throws it away
|
||||
|
||||
// Parameters from our host
|
||||
// x: Scene+Time
|
||||
// y: Height
|
||||
// z: Aspect offset
|
||||
// w: Sync
|
||||
uniform vec4 Y;
|
||||
|
||||
float cFac, CurTime, CurTime2, CurStep, pi2= 6.28319;
|
||||
int m;
|
||||
vec2 CurNormal;
|
||||
vec3 cRes, rayDir, CurColor = vec3(0.), RayStep = vec3(0.);
|
||||
vec3 LightColor= vec3( 3., 2.5, 2.0);
|
||||
vec3 BackColor= vec3( 0.7, 0.6, 0.4);
|
||||
vec4 HitMaterial;
|
||||
|
||||
vec2 rotate(vec2 v,float y)
|
||||
{
|
||||
return cos(y)*v+sin(y)*vec2(-v.y,v.x);
|
||||
}
|
||||
|
||||
float repeatr(inout vec2 v,float x, float y)
|
||||
{
|
||||
float a= atan(v.y,v.x);
|
||||
float z=mod(a,y)-y*.5;
|
||||
v=(length(v))*vec2(cos(z),sin(z));
|
||||
v.x-=x;
|
||||
return a-z;
|
||||
}
|
||||
|
||||
void repeat( inout float w, float y )
|
||||
{
|
||||
w= mod( w - y*.5, y ) - y*.5;
|
||||
}
|
||||
|
||||
void repeate( inout float w, float y, float z )
|
||||
{
|
||||
w= max( abs(w)-z, mod( w - y*.5, y ) - y*.5);
|
||||
}
|
||||
|
||||
float row( float w, float y)
|
||||
{
|
||||
return floor( ( w - y*.5 )/ y );
|
||||
}
|
||||
|
||||
float CBox( in vec3 p, in vec3 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec3(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float CBox2D( in vec2 p, in vec2 box, float rad )
|
||||
{
|
||||
return length( max( abs(p) - box + vec2(rad), 0.0 ) ) - rad;
|
||||
}
|
||||
|
||||
float plasm(float x, float a, float b,float c)
|
||||
{
|
||||
return sin(x+a+c*sin(x+b));
|
||||
}
|
||||
|
||||
float smin( float a, float b, float k )
|
||||
{
|
||||
float h = clamp( 0.5+0.5*(b-a)/k, 0.0, 1.0 );
|
||||
return mix( b, a, h ) - k*h*(1.0-h);
|
||||
}
|
||||
|
||||
float hash( vec2 p )
|
||||
{
|
||||
float h = dot(p,vec2(23.2,15.7));
|
||||
return fract(sin(h)*232.45);
|
||||
}
|
||||
|
||||
float noise(vec2 p)
|
||||
{
|
||||
vec2 e = vec2(1.0, 0.0);
|
||||
vec2 i = floor( p );
|
||||
vec2 f = fract( p );
|
||||
f *= f*(3.0-2.0*f);
|
||||
return -0.5 + mix( mix( hash( i + e.yy ),
|
||||
hash( i + e.xy ), f.x),
|
||||
mix( hash( i + e.yx ),
|
||||
hash( i + e.xx ), f.x), f.y);
|
||||
}
|
||||
|
||||
float tunnel(vec3 p)
|
||||
{
|
||||
p.y += 4.0 * plasm(1.1, CurTime * 3. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x += 4.0 * plasm(0.9, CurTime * 4. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
float r = row(p.z, 24.0);
|
||||
repeat(p.z, 24.0);
|
||||
p.xy= rotate( p.xy, r + plasm(1.1, CurTime * 4., 1.3, r * 0.2));
|
||||
r = max( 12. - length(p.xz), length(length(p.xy) - 32.) - 1.0);
|
||||
repeatr(p.xy, 32.0, pi2 / 5.0);
|
||||
return min ( r, max( length( p.z) - 1., length(length(p.xy) - 18.) - 1.0));
|
||||
}
|
||||
|
||||
float f0(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
return length(p) - 32. - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
return length(p) - 48. - Y.w;
|
||||
}
|
||||
}
|
||||
|
||||
float f1(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
float f = 999.0;
|
||||
|
||||
for (float i = 0.; i < 3.; i+=1)
|
||||
{
|
||||
vec3 o = p;
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
o.zx= rotate( o.zx, 2. * i + 4.3 * CurTime );
|
||||
o.z += 48. + 8.0 * plasm(1.1, CurTime * 2., 0.4, CurTime * 0.02);
|
||||
o.yz= rotate( o.yz, i + 5.9 * CurTime );
|
||||
o.xy= rotate( o.xy, i + 2.3 * CurTime );
|
||||
f = min (f, CBox(o, vec3(16., 16., 16.) + Y.w, 3.));
|
||||
}
|
||||
|
||||
return max( 40. - length(p), smin(f, length(p) - 34., 24.));
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
float r = 360. - CurTime * 222.0 - p.z;
|
||||
r = 8. - (r < 0. ? 0. : 0.001 * r * r);
|
||||
p.y -= 4.0 * plasm(1.1, CurTime * 2. + p.z * 0.02, 0.4, p.z * 0.02);
|
||||
p.x -= 4.0 * plasm(0.9, CurTime * 2. + p.z * 0.02, -1.4, p.z * 0.02);
|
||||
return length(p.xy) - r - Y.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.z += 192. - 96.* CurTime;
|
||||
|
||||
p.xy= rotate( p.xy, 2.3 * CurTime );
|
||||
p.yz= rotate( p.yz, 1.9 * CurTime );
|
||||
|
||||
return CBox(p, vec3(32., 32., 32.) + Y.w, 0.);
|
||||
}
|
||||
}
|
||||
|
||||
float f2(vec3 p)
|
||||
{
|
||||
if (CurScene > 7)
|
||||
{
|
||||
//return 999.0;
|
||||
float f = CBox(p, vec3(555., 555., 555.), 0.);
|
||||
|
||||
float s = 1.0;
|
||||
vec3 o = p;
|
||||
for( int m=0; m<4; m++ )
|
||||
{
|
||||
o.x += 33.;
|
||||
o.xz= rotate( o.xz, 1.6 + 0.13 * CurTime);
|
||||
o.yz= rotate( o.yz, 4.8 * 0.19 * CurTime );
|
||||
float y = 444./s;
|
||||
vec3 r = abs(0.33 - 1.0*abs(mod( o - y*.5, y ) - y*.5));
|
||||
f = max(f, 111.0 / s - min(max(r.x,r.y),min(max(r.y,r.z),max(r.z,r.x))));
|
||||
s*= 3.0;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
else if (CurScene > 3)
|
||||
{
|
||||
return tunnel(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
float s = repeatr(p.xy, 64.0, pi2 / 48.0);
|
||||
float r = row(p.z, 6.0);
|
||||
repeat(p.z, 12.0);
|
||||
s = plasm(s, CurTime * 8., 1.3, r * 0.2) + 0.8;
|
||||
return length(p) - s;
|
||||
}
|
||||
}
|
||||
|
||||
float f(vec3 p)
|
||||
{
|
||||
return min( min( f0(p), f1(p) ), f2(p) );
|
||||
}
|
||||
|
||||
float fN(vec3 p)
|
||||
{
|
||||
return f(p);
|
||||
}
|
||||
|
||||
void mat(vec3 p)
|
||||
{
|
||||
HitMaterial = vec4(-1.8, 3.0, 0.6, 2.0);
|
||||
|
||||
float z= 0.1;
|
||||
|
||||
if( z > f0(p) )
|
||||
{
|
||||
z= f0(p);
|
||||
CurColor = vec3(250, 105, 0)/255;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f1(p) )
|
||||
{
|
||||
z= f1(p);
|
||||
|
||||
CurColor = vec3(105, 210, 231)/255;
|
||||
CurStep= .6;
|
||||
}
|
||||
|
||||
if( z > f2(p) )
|
||||
{
|
||||
CurColor = vec3(224, 228, 204)/255;
|
||||
CurStep= .3;
|
||||
}
|
||||
}
|
||||
|
||||
vec3 lightSphere(vec3 normal, vec3 color, vec2 desc)
|
||||
{
|
||||
return smoothstep(desc.x, desc.y, dot(vec3( 0.86, 0.5, 0.0),normal)) * color;
|
||||
}
|
||||
|
||||
vec3 filter(vec3 col)
|
||||
{
|
||||
vec2 uv = vec2(gl_FragCoord.xy / Y.y);
|
||||
uv.x -= Y.z;
|
||||
vec2 uv2=2*uv-1;
|
||||
|
||||
float blend = min(8.0*abs(sin((Y.x)*3.1415)),1.0);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.x*Y.y);
|
||||
col*=.9+0.1*sin(10.*Y.x+uv2.y*Y.y);
|
||||
float Scr=1.5-length(uv2*2)*0.15;
|
||||
|
||||
if (uv.y >= blend-0.02) col*=0.7;
|
||||
if (uv.y >= blend-0.04) col*=0.7;
|
||||
if (uv.y <= 1.02-blend) col*=0.7;
|
||||
if (uv.y <= 1.04-blend) col*=0.7;
|
||||
|
||||
return smoothstep(0.0, 1.0, col*Scr*blend) * 2.0;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
CurTime= fract(Y.x);
|
||||
CurTime2= CurTime * CurTime;
|
||||
|
||||
// Get the look direction for the current pixel (always look forwards)
|
||||
rayDir = vec3((gl_FragCoord.xy / Y.y - 0.5), 0.8);
|
||||
rayDir.x -= Y.z;
|
||||
|
||||
// Camera position
|
||||
vec3 p = vec3( 0.0, 11.0, -CurTime * 33.0);
|
||||
|
||||
if( CurScene < 1)
|
||||
{
|
||||
p = vec3( -44.0, -33.0, 99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 2)
|
||||
{
|
||||
p = vec3( 22.0, 3.0, 111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
}
|
||||
else if( CurScene < 3 )
|
||||
{
|
||||
p = vec3( -44.0, -33.0, -99.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime);
|
||||
rayDir.xz= rotate( rayDir.xz, 4.5 -CurTime);
|
||||
}
|
||||
else if( CurScene < 4 )
|
||||
{
|
||||
p = vec3( 55.0, 33.0, -155.0 * (1.0 - CurTime * 0.6));
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4 );
|
||||
rayDir.xz= rotate( rayDir.xz, -4.5 - CurTime );
|
||||
}
|
||||
else if( CurScene < 5 )
|
||||
{
|
||||
p= vec3( 11., 0., -111.);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.);
|
||||
}
|
||||
else if( CurScene < 6 )
|
||||
{
|
||||
p= vec3( -18.0, -11., -111.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 7 )
|
||||
{
|
||||
p= vec3( -18.0, -11., 144.0 * (1.0 - CurTime * 0.3));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 8 )
|
||||
{
|
||||
p= vec3( 18.0, -11., 111.0 * (1.0 - CurTime * 0.5));
|
||||
rayDir.yz= rotate( rayDir.yz, -CurTime * .3);
|
||||
rayDir.xz= rotate( rayDir.xz, -0.3 + CurTime * 2.);
|
||||
}
|
||||
else if( CurScene < 9 )
|
||||
{
|
||||
p= vec3( -55.0, 99., 177.);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, 3.5 * (1.0 - CurTime * 0.3) );
|
||||
}
|
||||
else if( CurScene < 10 )
|
||||
{
|
||||
p= vec3( -290., 153., -70.);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.4);
|
||||
rayDir.xz= rotate( rayDir.xz, -CurTime);
|
||||
}
|
||||
else if( CurScene < 11 )
|
||||
{
|
||||
p= vec3( -66., 44.0, 0.0);
|
||||
rayDir.yz= rotate( rayDir.yz, 0.6 );
|
||||
rayDir.xz= rotate( rayDir.xz, 4.4 );
|
||||
}
|
||||
else //if( CurScene < 12 )
|
||||
{
|
||||
p= vec3( -33., 33.0 * (1.0-CurTime), -11.0);
|
||||
rayDir.yz= rotate( rayDir.yz, -0.5 );
|
||||
rayDir.xz= rotate( rayDir.xz, -1.0 );
|
||||
}
|
||||
|
||||
rayDir = normalize(rayDir);
|
||||
|
||||
cRes= vec3( .0,.0,.0 );
|
||||
cFac=1.0;
|
||||
|
||||
float t= 0.0,y,z;
|
||||
|
||||
m=0;
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
vec3 fog = lightSphere(rayDir, LightColor, HitMaterial.zw);
|
||||
while(m++<5)
|
||||
{
|
||||
float ii = 222.0;
|
||||
for (CurStep=1.0;ii >=0.0 && t<999.0 && CurStep>t*.000001;t+=CurStep,RayStep=rayDir*t,ii-=1.0)
|
||||
{
|
||||
CurStep = f(p+RayStep);
|
||||
}
|
||||
|
||||
if (ii <= 1)
|
||||
{
|
||||
ii = 0.;
|
||||
t = 999.3 ;
|
||||
RayStep=rayDir*t;
|
||||
break;
|
||||
}
|
||||
ii = smoothstep(44., 1., ii);
|
||||
|
||||
vec3 NextPos = p+RayStep;
|
||||
|
||||
// Start point and direction for reflected ray
|
||||
p= NextPos;
|
||||
|
||||
CurNormal = vec2(0.04, 0.0);
|
||||
vec3 n= vec3( fN(p + CurNormal.xyy) - fN(p - CurNormal.xyy), fN(p + CurNormal.yxy) - fN(p - CurNormal.yxy), fN(p + CurNormal.yyx) - fN(p - CurNormal.yyx) );
|
||||
|
||||
mat(p);
|
||||
n= normalize(n);
|
||||
|
||||
// CurStep == reflection
|
||||
|
||||
if( t > 999.0)
|
||||
{
|
||||
if( m < 2)
|
||||
{
|
||||
HitMaterial = vec4(-3.0, 8.0, 0.9, 1.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rayDir= reflect( rayDir, n );
|
||||
|
||||
// ao
|
||||
y= 8.0;
|
||||
for (z=1.0;y>0.;y-=1.0)
|
||||
{
|
||||
z-=.5*(y-f(p+n*y))/exp2(y);
|
||||
}
|
||||
CurColor*= z;
|
||||
CurColor*= lightSphere(rayDir, BackColor, HitMaterial.xy);
|
||||
|
||||
cRes+= cFac*mix(CurColor, fog, ii);
|
||||
cFac*= CurStep;
|
||||
t= 0.5;
|
||||
RayStep = rayDir * t;
|
||||
}
|
||||
|
||||
gl_FragColor.xyz = step(-12.0, -Y.x) * filter(cRes + cFac*
|
||||
( lightSphere(rayDir, LightColor, HitMaterial.zw) +
|
||||
lightSphere(rayDir, BackColor, HitMaterial.xy)));
|
||||
}
|
||||
303
ev16-4k/redist/intro2k15.vcxproj
Normal file
303
ev16-4k/redist/intro2k15.vcxproj
Normal file
@@ -0,0 +1,303 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Compress (slow)|Win32">
|
||||
<Configuration>Compress (slow)</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Compress (slow)|x64">
|
||||
<Configuration>Compress (slow)</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Video|Win32">
|
||||
<Configuration>Video</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Video|x64">
|
||||
<Configuration>Video</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{DE5F7702-06F1-44F7-8823-87A60E4990BE}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>intro2k15</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<ExecutablePath>$(SolutionDir);$(ExecutablePath)</ExecutablePath>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<ExecutablePath>$(SolutionDir);$(ExecutablePath)</ExecutablePath>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;glu32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Video|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<ProfileGuidedDatabase />
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<AdditionalDependencies>winmm.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/crinkler %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Gdi32.lib;user32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalOptions>/CRINKLER /COMPMODE:FAST /ORDERTRIES:400 /HASHTRIES:30 /UNSAFEIMPORT /TRUNCATEFLOATS:24 /HASHSIZE:200 /REPORT:report.html /RANGE:opengl32 /PROGRESSGUI /TRANSFORM:CALLS /UNALIGNCODE %(AdditionalOptions)</AdditionalOptions>
|
||||
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<ProfileGuidedDatabase />
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<AdditionalDependencies>winmm.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="4klang.h" />
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="intro_small.h" />
|
||||
<ClInclude Include="synth.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="4klang.asm">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Video|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">yasm-1.2.0-win32.exe -f win32 -o 4klang.obj 4klang.asm</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">4klang.inc</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling 4klang...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4klang.obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4klang.inc</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">4klang.inc</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Video|x64'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Video|x64'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Video|x64'">4klang.inc</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Compiling 4klang...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4klang.obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4klang.inc</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|x64'">4klang.inc</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
<None Include="4klang.inc" />
|
||||
<None Include="intro.fs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Object Include="4klang.obj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.compress.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.video.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main_rel.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress (slow)|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
6
ev16-4k/redist/intro2k15.vcxproj.user
Normal file
6
ev16-4k/redist/intro2k15.vcxproj.user
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ShowAllFiles>true</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
272
ev16-4k/redist/intro_small.h
Normal file
272
ev16-4k/redist/intro_small.h
Normal file
@@ -0,0 +1,272 @@
|
||||
/* File generated with Shader Minifier 1.1.1
|
||||
* http://www.ctrl-alt-test.fr
|
||||
*/
|
||||
#ifndef INTRO_SMALL_H_
|
||||
# define INTRO_SMALL_H_
|
||||
# define U_Y "v"
|
||||
|
||||
char intro_fs[] = ""
|
||||
"const int z=0x0;"
|
||||
"uniform vec4 v;"
|
||||
"float i,y,f,m,l=6.28319;"
|
||||
"int e;"
|
||||
"vec2 r;"
|
||||
"vec3 x,a,s=vec3(0.),w=vec3(0.),d=vec3(3.,2.5,2.),t=vec3(.7,.6,.4);"
|
||||
"vec4 b;"
|
||||
"vec2 n(vec2 a,float y)"
|
||||
"{"
|
||||
"return cos(y)*a+sin(y)*vec2(-a.y,a.x);"
|
||||
"}"
|
||||
"float n(inout vec2 a,float v,float y)"
|
||||
"{"
|
||||
"float z=atan(a.y,a.x),m=mod(z,y)-y*.5;"
|
||||
"a=length(a)*vec2(cos(m),sin(m));"
|
||||
"a.x-=v;"
|
||||
"return z-m;"
|
||||
"}"
|
||||
"void h(inout float z,float y)"
|
||||
"{"
|
||||
"z=mod(z-y*.5,y)-y*.5;"
|
||||
"}"
|
||||
"void h(inout float z,float y,float x)"
|
||||
"{"
|
||||
"z=max(abs(z)-x,mod(z-y*.5,y)-y*.5);"
|
||||
"}"
|
||||
"float p(float z,float y)"
|
||||
"{"
|
||||
"return floor((z-y*.5)/y);"
|
||||
"}"
|
||||
"float p(in vec3 z,in vec3 y,float a)"
|
||||
"{"
|
||||
"return length(max(abs(z)-y+vec3(a),0.))-a;"
|
||||
"}"
|
||||
"float c(in vec2 z,in vec2 y,float a)"
|
||||
"{"
|
||||
"return length(max(abs(z)-y+vec2(a),0.))-a;"
|
||||
"}"
|
||||
"float c(float z,float y,float x,float i)"
|
||||
"{"
|
||||
"return sin(z+y+i*sin(z+x));"
|
||||
"}"
|
||||
"float o(float y,float z,float x)"
|
||||
"{"
|
||||
"float a=clamp(.5+.5*(z-y)/x,0.,1.);"
|
||||
"return mix(z,y,a)-x*a*(1.-a);"
|
||||
"}"
|
||||
"float c(vec2 z)"
|
||||
"{"
|
||||
"float y=dot(z,vec2(23.2,15.7));"
|
||||
"return fract(sin(y)*232.45);"
|
||||
"}"
|
||||
"float h(vec2 y)"
|
||||
"{"
|
||||
"vec2 a=vec2(1.,0.),z=floor(y),v=fract(y);"
|
||||
"v*=v*(3.-2.*v);"
|
||||
"return-.5+mix(mix(c(z+a.yy),c(z+a.xy),v.x),mix(c(z+a.yx),c(z+a.xx),v.x),v.y);"
|
||||
"}"
|
||||
"float n(vec3 a)"
|
||||
"{"
|
||||
"a.y+=4.*c(1.1,y*3.+a.z*.02,.4,a.z*.02);"
|
||||
"a.x+=4.*c(.9,y*4.+a.z*.02,-1.4,a.z*.02);"
|
||||
"float z=p(a.z,24.);"
|
||||
"h(a.z,24.);"
|
||||
"a.xy=n(a.xy,z+c(1.1,y*4.,1.3,z*.2));"
|
||||
"z=max(12.-length(a.xz),length(length(a.xy)-32.)-1.);"
|
||||
"n(a.xy,32.,l/5.);"
|
||||
"return min(z,max(length(a.z)-1.,length(length(a.xy)-18.)-1.));"
|
||||
"}"
|
||||
"float o(vec3 y)"
|
||||
"{"
|
||||
"if(z>7)"
|
||||
"return length(y)-32.-v.w;"
|
||||
"else"
|
||||
" return length(y)-48.-v.w;"
|
||||
"}"
|
||||
"float p(vec3 a)"
|
||||
"{"
|
||||
"if(z>7)"
|
||||
"{"
|
||||
"float i=999.;"
|
||||
"for(float f=0.;f<3.;f+=1)"
|
||||
"{"
|
||||
"vec3 m=a;"
|
||||
"m.xy=n(m.xy,f+2.3*y);"
|
||||
"m.zx=n(m.zx,2.*f+4.3*y);"
|
||||
"m.z+=48.+8.*c(1.1,y*2.,.4,y*.02);"
|
||||
"m.yz=n(m.yz,f+5.9*y);"
|
||||
"m.xy=n(m.xy,f+2.3*y);"
|
||||
"i=min(i,p(m,vec3(16.,16.,16.)+v.w,3.));"
|
||||
"}"
|
||||
"return max(40.-length(a),o(i,length(a)-34.,24.));"
|
||||
"}"
|
||||
"else"
|
||||
" if(z>3)"
|
||||
"{"
|
||||
"float i=360.-y*222.-a.z;"
|
||||
"i=8.-(i<0.?0.:.001*i*i);"
|
||||
"a.y-=4.*c(1.1,y*2.+a.z*.02,.4,a.z*.02);"
|
||||
"a.x-=4.*c(.9,y*2.+a.z*.02,-1.4,a.z*.02);"
|
||||
"return length(a.xy)-i-v.w;"
|
||||
"}"
|
||||
"else"
|
||||
" return a.z+=192.-96.*y,a.xy=n(a.xy,2.3*y),a.yz=n(a.yz,1.9*y),p(a,vec3(32.,32.,32.)+v.w,0.);"
|
||||
"}"
|
||||
"float u(vec3 a)"
|
||||
"{"
|
||||
"if(z>7)"
|
||||
"{"
|
||||
"float i=p(a,vec3(555.,555.,555.),0.),f=1.;"
|
||||
"vec3 v=a;"
|
||||
"for(int m=0;m<4;m++)"
|
||||
"{"
|
||||
"v.x+=33.;"
|
||||
"v.xz=n(v.xz,1.6+.13*y);"
|
||||
"v.yz=n(v.yz,.912*y);"
|
||||
"float x=444./f;"
|
||||
"vec3 s=abs(.33-abs(mod(v-x*.5,x)-x*.5));"
|
||||
"i=max(i,111./f-min(max(s.x,s.y),min(max(s.y,s.z),max(s.z,s.x))));"
|
||||
"f*=3.;"
|
||||
"}"
|
||||
"return i;"
|
||||
"}"
|
||||
"else"
|
||||
" if(z>3)"
|
||||
"return n(a);"
|
||||
"else"
|
||||
"{"
|
||||
"float i=n(a.xy,64.,l/48.),f=p(a.z,6.);"
|
||||
"h(a.z,12.);"
|
||||
"i=c(i,y*8.,1.3,f*.2)+.8;"
|
||||
"return length(a)-i;"
|
||||
"}"
|
||||
"}"
|
||||
"float g(vec3 a)"
|
||||
"{"
|
||||
"return min(min(o(a),p(a)),u(a));"
|
||||
"}"
|
||||
"float F(vec3 a)"
|
||||
"{"
|
||||
"return g(a);"
|
||||
"}"
|
||||
"void C(vec3 a)"
|
||||
"{"
|
||||
"b=vec4(-1.8,3.,.6,2.);"
|
||||
"float z=.1;"
|
||||
"if(z>o(a))"
|
||||
"z=o(a),s=vec3(250,105,0)/255,m=.6;"
|
||||
"if(z>p(a))"
|
||||
"z=p(a),s=vec3(105,210,231)/255,m=.6;"
|
||||
"if(z>u(a))"
|
||||
"s=vec3(224,228,204)/255,m=.3;"
|
||||
"}"
|
||||
"vec3 C(vec3 y,vec3 z,vec2 a)"
|
||||
"{"
|
||||
"return smoothstep(a.x,a.y,dot(vec3(.86,.5,0.),y))*z;"
|
||||
"}"
|
||||
"vec3 k(vec3 y)"
|
||||
"{"
|
||||
"vec2 a=vec2(gl_FragCoord.xy/v.y);"
|
||||
"a.x-=v.z;"
|
||||
"vec2 z=2*a-1;"
|
||||
"float i=min(8.*abs(sin(v.x*3.1415)),1.);"
|
||||
"y*=.9+.1*sin(10.*v.x+z.x*v.y);"
|
||||
"y*=.9+.1*sin(10.*v.x+z.y*v.y);"
|
||||
"float m=1.5-length(z*2)*.15;"
|
||||
"if(a.y>=i-.02)"
|
||||
"y*=.7;"
|
||||
"if(a.y>=i-.04)"
|
||||
"y*=.7;"
|
||||
"if(a.y<=1.02-i)"
|
||||
"y*=.7;"
|
||||
"if(a.y<=1.04-i)"
|
||||
"y*=.7;"
|
||||
"return smoothstep(0.,1.,y*m*i)*2.;"
|
||||
"}"
|
||||
"void main()"
|
||||
"{"
|
||||
"y=fract(v.x);"
|
||||
"f=y*y;"
|
||||
"a=vec3(gl_FragCoord.xy/v.y-.5,.8);"
|
||||
"a.x-=v.z;"
|
||||
"vec3 l=vec3(0.,11.,-y*33.);"
|
||||
"if(z<1)"
|
||||
"l=vec3(-44.,-33.,99.),a.yz=n(a.yz,-y),a.xz=n(a.xz,-y);"
|
||||
"else"
|
||||
" if(z<2)"
|
||||
"l=vec3(22.,3.,111.*(1.-y*.3)),a.xz=n(a.xz,3.);"
|
||||
"else"
|
||||
" if(z<3)"
|
||||
"l=vec3(-44.,-33.,-99.),a.yz=n(a.yz,-y),a.xz=n(a.xz,4.5-y);"
|
||||
"else"
|
||||
" if(z<4)"
|
||||
"l=vec3(55.,33.,-155.*(1.-y*.6)),a.yz=n(a.yz,.4),a.xz=n(a.xz,-4.5-y);"
|
||||
"else"
|
||||
" if(z<5)"
|
||||
"l=vec3(11.,0.,-111.),a.xz=n(a.xz,3.);"
|
||||
"else"
|
||||
" if(z<6)"
|
||||
"l=vec3(-18.,-11.,-111.*(1.-y*.3)),a.yz=n(a.yz,-y*.3),a.xz=n(a.xz,-y);"
|
||||
"else"
|
||||
" if(z<7)"
|
||||
"l=vec3(-18.,-11.,144.*(1.-y*.3)),a.yz=n(a.yz,-y*.3),a.xz=n(a.xz,-y);"
|
||||
"else"
|
||||
" if(z<8)"
|
||||
"l=vec3(18.,-11.,111.*(1.-y*.5)),a.yz=n(a.yz,-y*.3),a.xz=n(a.xz,-.3+y*2.);"
|
||||
"else"
|
||||
" if(z<9)"
|
||||
"l=vec3(-55.,99.,177.),a.yz=n(a.yz,-.4),a.xz=n(a.xz,3.5*(1.-y*.3));"
|
||||
"else"
|
||||
" if(z<10)"
|
||||
"l=vec3(-290.,153.,-70.),a.yz=n(a.yz,.4),a.xz=n(a.xz,-y);"
|
||||
"else"
|
||||
" if(z<11)"
|
||||
"l=vec3(-66.,44.,0.),a.yz=n(a.yz,.6),a.xz=n(a.xz,4.4);"
|
||||
"else"
|
||||
" l=vec3(-33.,33.*(1.-y),-11.),a.yz=n(a.yz,-.5),a.xz=n(a.xz,-1.);"
|
||||
"a=normalize(a);"
|
||||
"x=vec3(0.,0.,0.);"
|
||||
"i=1.;"
|
||||
"float h=0.,u,p;"
|
||||
"e=0;"
|
||||
"b=vec4(-3.,8.,.9,1.);"
|
||||
"vec3 c=C(a,d,b.zw);"
|
||||
"while(e++<5)"
|
||||
"{"
|
||||
"float o=222.;"
|
||||
"for(m=1.;o>=0.&&h<999.&&m>h*1e-06;h+=m,w=a*h,o-=1.)"
|
||||
"m=g(l+w);"
|
||||
"if(o<=1)"
|
||||
"{"
|
||||
"o=0.;"
|
||||
"h=999.3;"
|
||||
"w=a*h;"
|
||||
"break;"
|
||||
"}"
|
||||
"o=smoothstep(44.,1.,o);"
|
||||
"vec3 Z=l+w;"
|
||||
"l=Z;"
|
||||
"r=vec2(.04,0.);"
|
||||
"vec3 Y=vec3(F(l+r.xyy)-F(l-r.xyy),F(l+r.yxy)-F(l-r.yxy),F(l+r.yyx)-F(l-r.yyx));"
|
||||
"C(l);"
|
||||
"Y=normalize(Y);"
|
||||
"if(h>999.)"
|
||||
"{"
|
||||
"if(e<2)"
|
||||
"b=vec4(-3.,8.,.9,1.);"
|
||||
"break;"
|
||||
"}"
|
||||
"a=reflect(a,Y);"
|
||||
"u=8.;"
|
||||
"for(p=1.;u>0.;u-=1.)"
|
||||
"p-=.5*(u-g(l+Y*u))/exp2(u);"
|
||||
"s*=p;"
|
||||
"s*=C(a,t,b.xy);"
|
||||
"x+=i*mix(s,c,o);"
|
||||
"i*=m;"
|
||||
"h=.5;"
|
||||
"w=a*h;"
|
||||
"}"
|
||||
"gl_FragColor.xyz=step(-12.,-v.x)*k(x+i*(C(a,d,b.zw)+C(a,t,b.xy)));"
|
||||
"}";
|
||||
|
||||
#endif // INTRO_SMALL_H_
|
||||
BIN
ev16-4k/redist/link.exe
Normal file
BIN
ev16-4k/redist/link.exe
Normal file
Binary file not shown.
307
ev16-4k/redist/main.compress.cpp
Normal file
307
ev16-4k/redist/main.compress.cpp
Normal file
@@ -0,0 +1,307 @@
|
||||
// HACKS - Don't use unless you're really in desperate size problems
|
||||
//------------------------------------------------------------------
|
||||
//#define WAVHDR_PREPARE_HACK
|
||||
//#define PFD_HACK
|
||||
|
||||
// FEATURES - Use whenever you can, at the expense of some size
|
||||
//-------------------------------------------------------------
|
||||
#define SHADER_WARMUP
|
||||
#define START_BLACK
|
||||
|
||||
// INCLUDES
|
||||
//---------
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "synth.h"
|
||||
#include <GL/gl.h>
|
||||
#include "glext.h"
|
||||
|
||||
// CONFIGURATION
|
||||
//---------------
|
||||
//#define WINDOWED
|
||||
|
||||
#ifndef SCREENWIDTH
|
||||
#define SCREENWIDTH 1280
|
||||
#endif
|
||||
|
||||
#ifndef SCREENHEIGHT
|
||||
#define SCREENHEIGHT 720
|
||||
#endif
|
||||
|
||||
#ifndef ASPECTOFFSET
|
||||
#define ASPECTOFFSET ((float(SCREENWIDTH) / float(SCREENHEIGHT) - 1.0f) * 0.5f)
|
||||
#endif
|
||||
|
||||
#define shaderOffset 14
|
||||
#define shaderCount 13
|
||||
#define ATOM_EDIT 0xC018
|
||||
#define ATOM_STATIC 0xC019
|
||||
#define SCENE_LENGTH (SAMPLES_PER_TICK * 128)
|
||||
|
||||
#pragma data_seg(".aspectOffset")
|
||||
static const float gfAspectOffset = ASPECTOFFSET;
|
||||
|
||||
#pragma data_seg(".scebeLength")
|
||||
static const int giSceneLength = SCENE_LENGTH;
|
||||
|
||||
#pragma data_seg(".Shader0")
|
||||
#include "intro_small.h"
|
||||
char* source = intro_fs;
|
||||
|
||||
struct FAKEDEVMODE
|
||||
{
|
||||
BYTE _a[36];
|
||||
DWORD dmSize;
|
||||
DWORD dmFields;
|
||||
struct
|
||||
{
|
||||
BYTE _b[4];
|
||||
DWORD pfdFlags;
|
||||
} pfd;
|
||||
BYTE _c[56];
|
||||
DWORD width;
|
||||
DWORD height;
|
||||
BYTE _d[8];
|
||||
};
|
||||
|
||||
#pragma data_seg(".devmode")
|
||||
static FAKEDEVMODE devmode = {
|
||||
"", sizeof(devmode), DM_PELSWIDTH | DM_PELSHEIGHT, "",
|
||||
#ifdef PFD_HACK
|
||||
0,
|
||||
#else
|
||||
PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL,
|
||||
#endif
|
||||
"", SCREENWIDTH, SCREENHEIGHT, ""
|
||||
};
|
||||
|
||||
#pragma data_seg("fcw")
|
||||
static WORD fcw = 0x0E7f;
|
||||
|
||||
#pragma data_seg(".fltused")
|
||||
int _fltused = 1;
|
||||
|
||||
#pragma data_seg(".glCreateShaderProgramv")
|
||||
static const char* sglCreateShaderProgramv = "glCreateShaderProgramv";
|
||||
|
||||
#pragma data_seg(".glUseProgram")
|
||||
static const char* sglUseProgram = "glUseProgram";
|
||||
|
||||
#pragma data_seg(".glUniform4f")
|
||||
static const char* sglUniform4f = "glUniform4f";
|
||||
|
||||
#pragma bss_seg(".mainbss")
|
||||
static GLuint programs[shaderCount];
|
||||
|
||||
#pragma code_seg(".main")
|
||||
void _cdecl main()
|
||||
{
|
||||
_asm
|
||||
{
|
||||
fldcw [fcw]
|
||||
|
||||
xor esi, esi
|
||||
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
|
||||
#ifndef WINDOWED
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push WS_POPUP | WS_VISIBLE | WS_MAXIMIZE
|
||||
push esi
|
||||
push ATOM_STATIC
|
||||
push esi
|
||||
push CDS_FULLSCREEN
|
||||
push offset devmode
|
||||
push esi
|
||||
push esi
|
||||
push offset lpSoundBuffer
|
||||
push _4klang_render
|
||||
push esi
|
||||
push esi
|
||||
call CreateThread
|
||||
call ChangeDisplaySettings
|
||||
call CreateWindowExA
|
||||
#else
|
||||
push SCREENHEIGHT
|
||||
push SCREENWIDTH
|
||||
push esi
|
||||
push esi
|
||||
push WS_POPUP | WS_VISIBLE
|
||||
push esi
|
||||
push ATOM_STATIC
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push offset lpSoundBuffer
|
||||
push _4klang_render
|
||||
push esi
|
||||
push esi
|
||||
call CreateThread
|
||||
call CreateWindowExA
|
||||
#endif
|
||||
|
||||
push eax
|
||||
call GetDC
|
||||
mov edi, eax
|
||||
|
||||
push esi
|
||||
#ifdef START_BLACK
|
||||
push edi
|
||||
#endif
|
||||
push edi
|
||||
#ifdef PFD_HACK
|
||||
push esi
|
||||
push 8
|
||||
#else
|
||||
push esi
|
||||
push offset devmode.pfd
|
||||
push edi
|
||||
call ChoosePixelFormat
|
||||
push eax
|
||||
#endif
|
||||
push edi
|
||||
call SetPixelFormat
|
||||
call wglCreateContext
|
||||
push eax
|
||||
push edi
|
||||
call wglMakeCurrent
|
||||
#ifdef START_BLACK
|
||||
call SwapBuffers
|
||||
#endif
|
||||
call ShowCursor
|
||||
|
||||
xor ebx, ebx
|
||||
|
||||
shaderwarmup :
|
||||
#ifdef SHADER_WARMUP
|
||||
push 1
|
||||
push 1
|
||||
push -1
|
||||
push -1
|
||||
#endif
|
||||
push offset source
|
||||
push 1
|
||||
push GL_FRAGMENT_SHADER
|
||||
push sglCreateShaderProgramv
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
mov dword ptr programs[ebx * 4], eax
|
||||
#ifdef SHADER_WARMUP
|
||||
push eax
|
||||
push sglUseProgram
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
#endif
|
||||
inc byte ptr[intro_fs + shaderOffset]
|
||||
|
||||
cmp ebx, 9
|
||||
jnz skip
|
||||
mov byte ptr[intro_fs + shaderOffset], 'A'
|
||||
skip:
|
||||
#ifdef SHADER_WARMUP
|
||||
push esi
|
||||
push gfAspectOffset
|
||||
push dword ptr[devmode.height]
|
||||
fild dword ptr[esp]
|
||||
fstp dword ptr[esp]
|
||||
push ebx
|
||||
fild dword ptr[esp]
|
||||
fstp dword ptr[esp]
|
||||
push esi
|
||||
push sglUniform4f
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
call glRecti
|
||||
#endif
|
||||
inc ebx
|
||||
cmp ebx, shaderCount
|
||||
jnz shaderwarmup
|
||||
|
||||
#ifndef WAVHDR_PREPARE_HACK
|
||||
push 0x20
|
||||
push offset WaveHDR
|
||||
#endif
|
||||
push 0x20
|
||||
push offset WaveHDR
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push offset WaveFMT
|
||||
push -1
|
||||
push offset hWaveOut
|
||||
call waveOutOpen
|
||||
#ifndef WAVHDR_PREPARE_HACK
|
||||
push[hWaveOut]
|
||||
call waveOutPrepareHeader
|
||||
#endif
|
||||
push [hWaveOut]
|
||||
call waveOutWrite
|
||||
|
||||
mainloop:
|
||||
push 0xC
|
||||
push offset MMTime
|
||||
push [hWaveOut]
|
||||
call waveOutGetPosition
|
||||
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push esi
|
||||
push edi
|
||||
push 1
|
||||
push 1
|
||||
push -1
|
||||
push -1
|
||||
push esi
|
||||
|
||||
// 4klang envelope buffer, instrument 2, 2x polyphony
|
||||
mov eax, dword ptr[MMTime + 4]
|
||||
shr eax, 3
|
||||
and eax, 1FFFFFE0h
|
||||
movss xmm0, dword ptr _4klang_envelope_buffer + 14h[eax * 4]
|
||||
addss xmm0, dword ptr _4klang_envelope_buffer + 10h[eax * 4]
|
||||
movss dword ptr[esp], xmm0
|
||||
|
||||
push gfAspectOffset
|
||||
push dword ptr[devmode.height]
|
||||
fild dword ptr[esp]
|
||||
fstp dword ptr[esp]
|
||||
push dword ptr[MMTime.u.sample]
|
||||
fild dword ptr[esp]
|
||||
fild giSceneLength
|
||||
fdiv
|
||||
fst dword ptr[esp]
|
||||
push esi
|
||||
push esi
|
||||
fistp dword ptr[esp]
|
||||
pop eax
|
||||
push dword ptr programs[eax * 4]
|
||||
push sglUseProgram
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
|
||||
push sglUniform4f
|
||||
call wglGetProcAddress
|
||||
call eax
|
||||
call glRecti
|
||||
call SwapBuffers
|
||||
call PeekMessage
|
||||
|
||||
cmp dword ptr [MMTime+4], MAX_SAMPLES
|
||||
jae exit
|
||||
push VK_ESCAPE
|
||||
call GetAsyncKeyState
|
||||
test ax,ax
|
||||
je mainloop
|
||||
exit:
|
||||
push esi
|
||||
call ExitProcess
|
||||
}
|
||||
}
|
||||
217
ev16-4k/redist/main.video.cpp
Normal file
217
ev16-4k/redist/main.video.cpp
Normal file
@@ -0,0 +1,217 @@
|
||||
// INCLUDES
|
||||
//---------
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "synth.h"
|
||||
#include <GL/gl.h>
|
||||
#include "glext.h"
|
||||
#include "intro_small.h"
|
||||
#include <vfw.h>
|
||||
|
||||
// CONFIG
|
||||
//-------
|
||||
#define FPS 60
|
||||
#define MOTION_BLUR 2
|
||||
#define SCREENWIDTH 1920
|
||||
#define SCREENHEIGHT 1080
|
||||
#define ASPECTOFFSET ((float(SCREENWIDTH) / float(SCREENHEIGHT) - 1.0f) * 0.5f)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PAVISTREAM m_ps;
|
||||
PAVISTREAM m_psCompressed;
|
||||
PAVISTREAM m_psAudio;
|
||||
AVISTREAMINFO m_strhdr;
|
||||
AVICOMPRESSOPTIONS m_opts;
|
||||
PAVIFILE m_pfile;
|
||||
BITMAPINFOHEADER m_alpbi;
|
||||
} AVIWRITER;
|
||||
|
||||
static AVIWRITER avi;
|
||||
static int frame = 0;
|
||||
static GLushort tempBuffer[3 * SCREENWIDTH * SCREENHEIGHT];
|
||||
static GLubyte data[3 * SCREENWIDTH * SCREENHEIGHT];
|
||||
|
||||
struct FAKEPFD
|
||||
{
|
||||
WORD nSize;
|
||||
WORD nVersion;
|
||||
DWORD dwFlags;
|
||||
// Snip
|
||||
};
|
||||
|
||||
struct FAKEDEVMODE
|
||||
{
|
||||
BYTE dmDeviceName[CCHDEVICENAME];
|
||||
WORD dmSpecVersion;
|
||||
WORD dmDriverVersion;
|
||||
WORD dmSize;
|
||||
WORD dmDriverExtra;
|
||||
DWORD dmFields;
|
||||
union {
|
||||
/* printer only fields */
|
||||
struct {
|
||||
short dmOrientation;
|
||||
short dmPaperSize;
|
||||
short dmPaperLength;
|
||||
short dmPaperWidth;
|
||||
short dmScale;
|
||||
short dmCopies;
|
||||
short dmDefaultSource;
|
||||
short dmPrintQuality;
|
||||
};
|
||||
FAKEPFD pfd;
|
||||
};
|
||||
short dmColor;
|
||||
short dmDuplex;
|
||||
short dmYResolution;
|
||||
short dmTTOption;
|
||||
short dmCollate;
|
||||
BYTE dmFormName[CCHFORMNAME];
|
||||
WORD dmLogPixels;
|
||||
DWORD dmBitsPerPel;
|
||||
DWORD dmPelsWidth;
|
||||
DWORD dmPelsHeight;
|
||||
union {
|
||||
DWORD dmDisplayFlags;
|
||||
DWORD dmNup;
|
||||
};
|
||||
DWORD dmDisplayFrequency;
|
||||
};
|
||||
|
||||
static PFNGLCREATESHADERPROGRAMEXTPROC glCreateShaderProgramEXT;
|
||||
static PFNGLUSEPROGRAMPROC glUseProgram;
|
||||
static PFNGLUNIFORM4FPROC glUniform4f;
|
||||
|
||||
static FAKEDEVMODE devmode = {
|
||||
"", 0, 0, sizeof(devmode), 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0, 0, PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0
|
||||
};
|
||||
|
||||
static const char* sglCreateShaderProgramEXT = "glCreateShaderProgramEXT";
|
||||
static const char* sglUseProgram = "glUseProgram";
|
||||
static const char* sglUniform4f = "glUniform4f";
|
||||
|
||||
#define shaderCountOffset 14
|
||||
|
||||
#define ATOM_EDIT 0xC018
|
||||
#define ATOM_STATIC 0xC019
|
||||
|
||||
#define SCENE_LENGTH (SAMPLES_PER_TICK * 128)
|
||||
|
||||
void _cdecl main()
|
||||
{
|
||||
InitSound();
|
||||
HWND hWnd = CreateWindowExA(0, (LPCSTR)ATOM_STATIC, 0, WS_VISIBLE | WS_SYSMENU, 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0, 0);
|
||||
HDC hDC = GetDC(hWnd);
|
||||
|
||||
SetPixelFormat(hDC, ChoosePixelFormat(hDC, (const PIXELFORMATDESCRIPTOR*)&devmode.pfd), 0);
|
||||
wglMakeCurrent(hDC, wglCreateContext(hDC));
|
||||
|
||||
glCreateShaderProgramEXT = (PFNGLCREATESHADERPROGRAMEXTPROC)wglGetProcAddress(sglCreateShaderProgramEXT);
|
||||
glUseProgram = (PFNGLUSEPROGRAMPROC)wglGetProcAddress(sglUseProgram);
|
||||
glUniform4f = (PFNGLUNIFORM4FPROC)wglGetProcAddress(sglUniform4f);
|
||||
|
||||
for (int i = 0; i < 12; ++i)
|
||||
{
|
||||
glUseProgram(glCreateShaderProgramEXT(GL_FRAGMENT_SHADER, intro_fs));
|
||||
intro_fs[shaderCountOffset]++;
|
||||
if (i == 9)
|
||||
{
|
||||
intro_fs[shaderCountOffset] = 'A';
|
||||
}
|
||||
glUniform4f(0, i, SCREENHEIGHT, ASPECTOFFSET, 0.0f);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
}
|
||||
|
||||
AVIFileInit();
|
||||
AVIFileOpen(&avi.m_pfile, "intro.avi", OF_WRITE | OF_CREATE, NULL);
|
||||
|
||||
memset(&avi.m_strhdr, 0, sizeof(avi.m_strhdr));
|
||||
avi.m_strhdr.fccType = streamtypeVIDEO;
|
||||
avi.m_strhdr.fccHandler = 0;
|
||||
avi.m_strhdr.dwScale = 1;
|
||||
avi.m_strhdr.dwRate = FPS;
|
||||
avi.m_strhdr.dwSuggestedBufferSize = 0;
|
||||
SetRect(&avi.m_strhdr.rcFrame, 0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
AVIFileCreateStream(avi.m_pfile, &avi.m_ps, &avi.m_strhdr);
|
||||
|
||||
memset(&avi.m_strhdr, 0, sizeof(avi.m_strhdr));
|
||||
avi.m_strhdr.fccType = streamtypeAUDIO;
|
||||
avi.m_strhdr.dwScale = WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwRate = WaveFMT.nSamplesPerSec * WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwSampleSize = WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwQuality = (DWORD)-1;
|
||||
SetRect(&avi.m_strhdr.rcFrame, 0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
AVIFileCreateStream(avi.m_pfile, &avi.m_psAudio, &avi.m_strhdr);
|
||||
AVIStreamSetFormat(avi.m_psAudio, 0, &WaveFMT, sizeof(WAVEFORMATEX));
|
||||
|
||||
// Display "choose codec" dialog, allow user to cancel
|
||||
auto ops = &avi.m_opts;
|
||||
if (AVISaveOptions(hWnd, 0, 1, &avi.m_ps, &ops) == FALSE)
|
||||
{
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
AVIMakeCompressedStream(&avi.m_psCompressed, avi.m_ps, &avi.m_opts, NULL);
|
||||
|
||||
memset(&avi.m_alpbi, 0, sizeof(avi.m_alpbi));
|
||||
avi.m_alpbi.biSize = sizeof(avi.m_alpbi);
|
||||
avi.m_alpbi.biWidth = SCREENWIDTH;
|
||||
avi.m_alpbi.biHeight = SCREENHEIGHT;
|
||||
avi.m_alpbi.biPlanes = 1;
|
||||
avi.m_alpbi.biBitCount = 24;
|
||||
avi.m_alpbi.biCompression = BI_RGB;
|
||||
|
||||
AVIStreamSetFormat(avi.m_psCompressed, 0, &avi.m_alpbi, sizeof(avi.m_alpbi));
|
||||
|
||||
int sample = 0;
|
||||
do
|
||||
{
|
||||
sample = ((float)frame / (float)(FPS * MOTION_BLUR)) * SAMPLE_RATE;
|
||||
float fTime = (float)sample / SCENE_LENGTH;
|
||||
|
||||
glUseProgram((int)fTime + 1);
|
||||
|
||||
int i = ((sample >> 8) << 5) + 2 * 2;
|
||||
float* a = &_4klang_envelope_buffer;
|
||||
float aha = a[i] + a[i + 1];
|
||||
|
||||
glUniform4f(0, fTime, SCREENHEIGHT, ASPECTOFFSET, aha);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
SwapBuffers(hDC);
|
||||
|
||||
::PeekMessage(0, 0, 0, 0, 0);
|
||||
|
||||
glReadPixels(0, 0, SCREENWIDTH, SCREENHEIGHT, GL_BGR_EXT, GL_UNSIGNED_BYTE, data);
|
||||
|
||||
for (int i = 0; i < SCREENWIDTH * SCREENHEIGHT * 3; ++i)
|
||||
{
|
||||
tempBuffer[i] += data[i];
|
||||
}
|
||||
|
||||
if ((frame++ % MOTION_BLUR) == 0)
|
||||
{
|
||||
for (int i = 0; i < SCREENWIDTH * SCREENHEIGHT * 3; ++i)
|
||||
{
|
||||
data[i] = (tempBuffer[i] / MOTION_BLUR);
|
||||
tempBuffer[i] = 0;
|
||||
}
|
||||
|
||||
AVIStreamWrite(avi.m_psCompressed, (frame - 1) / MOTION_BLUR, 1, data, 3 * SCREENWIDTH * SCREENHEIGHT, AVIIF_KEYFRAME, NULL, NULL);
|
||||
}
|
||||
|
||||
} while (sample < MAX_SAMPLES && !GetAsyncKeyState(VK_ESCAPE));
|
||||
|
||||
auto const extraSamples = 0;// SOUND_TICKS_PER_SCENE * SAMPLES_PER_TICK / 4;
|
||||
static SAMPLE_TYPE audioBuffer[2 * (MAX_SAMPLES + extraSamples)];
|
||||
memcpy(audioBuffer + extraSamples * 2, WaveHDR.lpData, WaveHDR.dwBufferLength);
|
||||
AVIStreamWrite(avi.m_psAudio, 0, MAX_SAMPLES + extraSamples, audioBuffer, WaveHDR.dwBufferLength + extraSamples * sizeof(SAMPLE_TYPE) * 2, 0, NULL, NULL);
|
||||
|
||||
AVIStreamClose(avi.m_ps);
|
||||
AVIStreamClose(avi.m_psCompressed);
|
||||
AVIStreamClose(avi.m_psAudio);
|
||||
AVIFileClose(avi.m_pfile);
|
||||
AVIFileExit();
|
||||
}
|
||||
156
ev16-4k/redist/main_rel.cpp
Normal file
156
ev16-4k/redist/main_rel.cpp
Normal file
@@ -0,0 +1,156 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include "synth.h"
|
||||
#include <GL/gl.h>
|
||||
#include "glext.h"
|
||||
|
||||
#ifndef SCREENWIDTH
|
||||
#define SCREENWIDTH 1280
|
||||
#endif
|
||||
|
||||
#ifndef SCREENHEIGHT
|
||||
#define SCREENHEIGHT 720
|
||||
#endif
|
||||
|
||||
#ifndef ASPECTOFFSET
|
||||
#define ASPECTOFFSET ((float(SCREENWIDTH) / float(SCREENHEIGHT) - 1.0f) * 0.5f)
|
||||
#endif
|
||||
|
||||
#define WINDOWED
|
||||
|
||||
#pragma data_seg(".Shader0")
|
||||
#include "intro_small.h"
|
||||
char* source = intro_fs;
|
||||
|
||||
struct FAKEPFD
|
||||
{
|
||||
WORD nSize;
|
||||
WORD nVersion;
|
||||
DWORD dwFlags;
|
||||
// Snip
|
||||
};
|
||||
|
||||
struct FAKEDEVMODE
|
||||
{
|
||||
BYTE dmDeviceName[CCHDEVICENAME];
|
||||
WORD dmSpecVersion;
|
||||
WORD dmDriverVersion;
|
||||
WORD dmSize;
|
||||
WORD dmDriverExtra;
|
||||
DWORD dmFields;
|
||||
union {
|
||||
/* printer only fields */
|
||||
struct {
|
||||
short dmOrientation;
|
||||
short dmPaperSize;
|
||||
short dmPaperLength;
|
||||
short dmPaperWidth;
|
||||
short dmScale;
|
||||
short dmCopies;
|
||||
short dmDefaultSource;
|
||||
short dmPrintQuality;
|
||||
};
|
||||
FAKEPFD pfd;
|
||||
};
|
||||
short dmColor;
|
||||
short dmDuplex;
|
||||
short dmYResolution;
|
||||
short dmTTOption;
|
||||
short dmCollate;
|
||||
BYTE dmFormName[CCHFORMNAME];
|
||||
WORD dmLogPixels;
|
||||
DWORD dmBitsPerPel;
|
||||
DWORD dmPelsWidth;
|
||||
DWORD dmPelsHeight;
|
||||
union {
|
||||
DWORD dmDisplayFlags;
|
||||
DWORD dmNup;
|
||||
};
|
||||
DWORD dmDisplayFrequency;
|
||||
};
|
||||
|
||||
#pragma data_seg(".devmode")
|
||||
static FAKEDEVMODE devmode = {
|
||||
"", 0, 0, sizeof(devmode), 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0, 0, PFD_DOUBLEBUFFER | PFD_SUPPORT_OPENGL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0
|
||||
};
|
||||
|
||||
#pragma data_seg(".fltused")
|
||||
int _fltused = 1;
|
||||
|
||||
#pragma data_seg(".glCreateShaderProgramv")
|
||||
static const char* sglCreateShaderProgramv = "glCreateShaderProgramv";
|
||||
|
||||
#pragma data_seg(".glUseProgram")
|
||||
static const char* sglUseProgram = "glUseProgram";
|
||||
|
||||
#pragma data_seg(".glUniform4f")
|
||||
static const char* sglUniform4f = "glUniform4f";
|
||||
|
||||
#define shaderOffset 14
|
||||
#define shaderCount 12
|
||||
#define ATOM_EDIT 0xC018
|
||||
#define ATOM_STATIC 0xC019
|
||||
#define SCENE_LENGTH (SAMPLES_PER_TICK * 128)
|
||||
|
||||
#pragma bss_seg(".mainbss")
|
||||
static PFNGLCREATESHADERPROGRAMVPROC glCreateShaderProgramv;
|
||||
static PFNGLUSEPROGRAMPROC glUseProgram;
|
||||
static PFNGLUNIFORM4FPROC glUniform4f;
|
||||
static GLuint programs[shaderCount];
|
||||
|
||||
#pragma code_seg(".main")
|
||||
void _cdecl main()
|
||||
{
|
||||
InitSound();
|
||||
|
||||
#ifndef WINDOWED
|
||||
ChangeDisplaySettings((DEVMODEA*)&devmode, CDS_FULLSCREEN);
|
||||
HDC hDC = GetDC(CreateWindowExA(0, (LPCSTR)ATOM_STATIC, 0, WS_POPUP | WS_VISIBLE | WS_MAXIMIZE, 0, 0, 0, 0, 0, 0, 0, 0));
|
||||
#else
|
||||
HDC hDC = GetDC(CreateWindowExA(0, (LPCSTR)ATOM_STATIC, 0, WS_VISIBLE | WS_SYSMENU, 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0, 0));
|
||||
#endif
|
||||
|
||||
SetPixelFormat(hDC, ChoosePixelFormat(hDC, (const PIXELFORMATDESCRIPTOR*)&devmode.pfd), 0);
|
||||
wglMakeCurrent(hDC, wglCreateContext(hDC));
|
||||
|
||||
glCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)wglGetProcAddress(sglCreateShaderProgramv);
|
||||
glUseProgram = (PFNGLUSEPROGRAMPROC)wglGetProcAddress(sglUseProgram);
|
||||
glUniform4f = (PFNGLUNIFORM4FPROC)wglGetProcAddress(sglUniform4f);
|
||||
|
||||
for (int i = 0; i < shaderCount; ++i)
|
||||
{
|
||||
programs[i] = glCreateShaderProgramv(GL_FRAGMENT_SHADER, 1, &source);
|
||||
intro_fs[shaderOffset]++;
|
||||
if (i == 9)
|
||||
{
|
||||
intro_fs[shaderOffset] = 'A';
|
||||
}
|
||||
glUseProgram(programs[i]);
|
||||
glUniform4f(0, i, SCREENHEIGHT, ASPECTOFFSET, 0.0f);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
}
|
||||
|
||||
ShowCursor(FALSE);
|
||||
PlaySound();
|
||||
|
||||
do
|
||||
{
|
||||
get_Sample();
|
||||
|
||||
float fTime = (float)MMTime.u.sample / SCENE_LENGTH;
|
||||
|
||||
glUseProgram(programs[(int)fTime]);
|
||||
|
||||
int i = ((MMTime.u.sample >> 8) << 5) + 2 * 2;
|
||||
float* a = &_4klang_envelope_buffer;
|
||||
float aha = a[i] + a[i + 1];
|
||||
|
||||
glUniform4f(0, fTime, SCREENHEIGHT, ASPECTOFFSET, aha);
|
||||
glRecti(-1, -1, 1, 1);
|
||||
SwapBuffers(hDC);
|
||||
|
||||
::PeekMessage(0, 0, 0, 0, 0);
|
||||
} while (MMTime.u.sample < MAX_SAMPLES && !GetAsyncKeyState(VK_ESCAPE));
|
||||
|
||||
ExitProcess(0);
|
||||
}
|
||||
79
ev16-4k/redist/obj/Compress (slow)/intro2k15.log
Normal file
79
ev16-4k/redist/obj/Compress (slow)/intro2k15.log
Normal file
@@ -0,0 +1,79 @@
|
||||
main.compress.cpp
|
||||
Crinkler 2.0 (Jul 28 2015) (c) 2005-2015 Aske Simon Christensen & Rune Stubbe
|
||||
|
||||
Ignoring unknown argument '/ERRORREPORT:PROMPT'
|
||||
Ignoring unknown argument '/INCREMENTAL:NO'
|
||||
Ignoring unknown argument '/NOLOGO'
|
||||
Ignoring unknown argument '/MANIFEST'
|
||||
Ignoring unknown argument '/MANIFESTUAC:level='asInvoker' uiAccess='false''
|
||||
Ignoring unknown argument '/manifest:embed'
|
||||
Ignoring unknown argument '/DEBUG'
|
||||
Ignoring unknown argument '/PDB:E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.pdb'
|
||||
Ignoring unknown argument '/TLBID:1'
|
||||
Ignoring unknown argument '/DYNAMICBASE'
|
||||
Ignoring unknown argument '/NXCOMPAT'
|
||||
Ignoring unknown argument '/IMPLIB:E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.lib'
|
||||
Ignoring unknown argument '/MACHINE:X86'
|
||||
Ignoring unknown argument '/SAFESEH'
|
||||
Target: E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.exe
|
||||
Tiny compressor: NO
|
||||
Tiny import: NO
|
||||
Subsystem type: CONSOLE
|
||||
Large address aware: NO
|
||||
Compression mode: FAST
|
||||
Saturate counters: NO
|
||||
Hash size: 100 MB
|
||||
Hash tries: 20
|
||||
Order tries: 0
|
||||
Report: NONE
|
||||
Transforms: NONE
|
||||
Replace DLLs: NONE
|
||||
Fallback DLLs: NONE
|
||||
Range DLLs: NONE
|
||||
Exports: NONE
|
||||
|
||||
Loading winmm.lib...
|
||||
Loading opengl32.lib...
|
||||
Loading kernel32.lib...
|
||||
Loading user32.lib...
|
||||
Loading gdi32.lib...
|
||||
Loading winspool.lib...
|
||||
Loading comdlg32.lib...
|
||||
Loading advapi32.lib...
|
||||
Loading shell32.lib...
|
||||
Loading ole32.lib...
|
||||
Loading oleaut32.lib...
|
||||
Loading uuid.lib...
|
||||
Loading odbc32.lib...
|
||||
Loading odbccp32.lib...
|
||||
Loading 4klang.obj...
|
||||
Loading E:\blu-flame.org\ev16-4k\redist\obj\Compress (slow)\main.compress.obj...
|
||||
Loading 4klang.obj...
|
||||
|
||||
Linking...
|
||||
|
||||
|
||||
Uncompressed size of code: 2224
|
||||
Uncompressed size of data: 7096
|
||||
|
||||
|-- Estimating models for code ----------------------------|
|
||||
............................................................ 0m00s
|
||||
Ideal compressed size: 1330.77
|
||||
|
||||
|-- Estimating models for data ----------------------------|
|
||||
............................................................ 0m00s
|
||||
Ideal compressed size: 2380.26
|
||||
|
||||
Estimated ideal compressed total size: 3711.03
|
||||
|
||||
|-- Optimizing hash table size ----------------------------|
|
||||
............................................................ 0m00s
|
||||
Real compressed total size: 3718
|
||||
Bytes lost to hashing: 6.97
|
||||
|
||||
Output file: E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.exe
|
||||
Final file size: 4078 (previous size 4083)
|
||||
|
||||
time spent: 0m03s
|
||||
intro2k15.vcxproj -> E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.exe
|
||||
intro2k15.vcxproj -> E:\blu-flame.org\ev16-4k\redist\bin\Compress (slow)\intro2k15.pdb (Full PDB)
|
||||
Binary file not shown.
BIN
ev16-4k/redist/obj/Compress (slow)/intro2k15.tlog/CL.read.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Compress (slow)/intro2k15.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
|
||||
Compress (slow)|Win32|E:\blu-flame.org\ev16-4k\redist\|
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ev16-4k/redist/obj/Compress (slow)/main.compress.obj
Normal file
BIN
ev16-4k/redist/obj/Compress (slow)/main.compress.obj
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Compress (slow)/vc140.pdb
Normal file
BIN
ev16-4k/redist/obj/Compress (slow)/vc140.pdb
Normal file
Binary file not shown.
13
ev16-4k/redist/obj/Release/intro2k15.log
Normal file
13
ev16-4k/redist/obj/Release/intro2k15.log
Normal file
@@ -0,0 +1,13 @@
|
||||
main_rel.cpp
|
||||
main_rel.cpp(129): warning C4244: 'argument': conversion from 'int' to 'GLfloat', possible loss of data
|
||||
Crinkler 2.0 (Jul 28 2015) (c) 2005-2015 Aske Simon Christensen & Rune Stubbe
|
||||
|
||||
Launching default linker at 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\VC\BIN\LINK.EXE'
|
||||
|
||||
4klang.obj : warning LNK4042: object specified more than once; extras ignored
|
||||
Generating code
|
||||
1 of 4 functions (25.0%) were compiled, the rest were copied from previous compilation.
|
||||
0 functions were new in current compilation
|
||||
0 functions had inline decision re-evaluated but remain unchanged
|
||||
Finished generating code
|
||||
intro2k15.vcxproj -> E:\blu-flame.org\ev16-4k\redist\bin\Release\intro2k15.exe
|
||||
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.command.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.command.1.tlog
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.read.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.write.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/CL.write.1.tlog
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
|
||||
Release|Win32|E:\blu-flame.org\ev16-4k\redist\|
|
||||
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/link.command.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/link.command.1.tlog
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/link.read.1.tlog
Normal file
BIN
ev16-4k/redist/obj/Release/intro2k15.tlog/link.read.1.tlog
Normal file
Binary file not shown.
BIN
ev16-4k/redist/obj/Release/main_rel.obj
Normal file
BIN
ev16-4k/redist/obj/Release/main_rel.obj
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user