Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ray-traced VC Textures #379

Draft
wants to merge 46 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ef6bf1f
Project to implement ray-traced VC texture support. Issue #378
jarmonik Jul 25, 2023
99f135a
Merge branch 'main' of https://github.com/orbitersim/orbiter into Bak…
jarmonik Jul 25, 2023
62ab5bf
Fixed build errors. Added new shaders in a shader folder.
jarmonik Jul 25, 2023
a193053
Enabled basic shadows for virtual cockpit. Cascaded maps still needs …
jarmonik Jul 25, 2023
e86a211
Fixed issue #322
jarmonik Jul 25, 2023
fb61851
- Added oapiMeshProperty() and oapiLoadAdditionalTextureMaps() functions
jarmonik Jul 26, 2023
47eec6d
Fixed oapiLoadAdditionalMaps() for D3D7
jarmonik Jul 26, 2023
8d78044
Work in progress
jarmonik Jul 26, 2023
ce9fd0a
-Added a baked lights test control slider to debug controls Dialog
jarmonik Jul 27, 2023
925a4ed
- Pre-Bake is now in a working condition. Baked maps are fed to the s…
jarmonik Jul 28, 2023
c07d722
Removed texture "tuning" stuff to simplify the code.
jarmonik Jul 28, 2023
ac7da1a
Merge branch 'main' into BakedVC
jarmonik Jul 28, 2023
ba7a4c6
Merge branch 'main' of https://github.com/orbitersim/orbiter into Bak…
jarmonik Jul 28, 2023
c72b5e3
Shadow cascade creation implemented.
jarmonik Jul 29, 2023
6a69b93
Merge branch 'BakedVC' of https://github.com/orbitersim/orbiter into …
jarmonik Jul 29, 2023
f361bf4
- Fixed a VC shadow bug, exported VC ambient level to shaders.
jarmonik Jul 30, 2023
2feb632
Cleaned up shadow maps
jarmonik Jul 31, 2023
55b6cd9
- Implementation of cascaded VC shadows passed preliminary testing. F…
jarmonik Aug 1, 2023
40c8342
Shadow cascade configuration improved
jarmonik Aug 2, 2023
ea5d97f
Fixed some bugs. Hard coded VC shadows to use 9 samples. Fixed cascad…
jarmonik Aug 15, 2023
21631fd
Added VC shadow config options in a setup dialog
jarmonik Aug 15, 2023
9bc4332
Increased baked lights count to 16
jarmonik Aug 18, 2023
4e505d2
Added a separate enable control for AO and baked light maps.
jarmonik Aug 18, 2023
6397e1b
Fixed MeshProperty function to support 16 baked lights.
jarmonik Aug 18, 2023
8f77cee
Implemented loading of baked sunlight ambient occlusion textures.
jarmonik Nov 13, 2023
1945793
Fixed light control slider's default position bug
jarmonik Nov 13, 2023
9afe991
Updated BakedVC shader to use baked sunlight map
jarmonik Nov 14, 2023
0b59947
Working on better mesh debugger.
jarmonik Nov 22, 2023
b868bef
Added additional debug options and bug fixes
jarmonik Nov 23, 2023
0ad2cd4
Fixed Pick related bugs and added Mesh visibility info in debug contr…
jarmonik Nov 24, 2023
c8e0d84
Fixed Mesh Saving, Improved Picking options, Added VC shadow caster s…
jarmonik Nov 26, 2023
324be7c
- Verbose logging added. oapiWriteLogVerbose()
jarmonik Jan 23, 2024
bdc8996
Merge branch 'main' of https://github.com/orbitersim/orbiter into Bak…
jarmonik Jan 23, 2024
4534b74
Improved VC ambient environment debugging.
jarmonik Jan 24, 2024
8c8055f
Renamed GetObject() function to avoid mixup with Windows macro.
jarmonik Jan 24, 2024
80da3af
Created a stage-set for object rendering.
jarmonik Jan 25, 2024
062e5cf
Added shadows for stage-set, bug fixes and code cleanup.
jarmonik Feb 4, 2024
fd36aad
Merge branch 'main' of https://github.com/orbitersim/orbiter into Bak…
jarmonik Feb 4, 2024
2154635
Fixed broken 'pick' function. Added dynamic sunlight disable option i…
jarmonik Feb 4, 2024
cf964a8
Added rendering of VC reflection and irradiance maps
jarmonik Feb 9, 2024
9f48115
Dynamic cockpit lighting prototype operational.
jarmonik Feb 14, 2024
b1d4a4b
Made some improvements and optimizations.
jarmonik Feb 15, 2024
f58f1e7
Added Debug Visualization of Virtual Cockpit click zones.
jarmonik Feb 16, 2024
439ba61
Fixed flickering local lights
jarmonik Feb 17, 2024
d1c1566
Some small fixes.
jarmonik Feb 18, 2024
6c25b59
Fixed build errors
jarmonik Feb 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions Meshes/D3D9Box.msh
@@ -0,0 +1,49 @@
MSHX1
GROUPS 1
LABEL Box
MATERIAL 1 // Material.001
GEOM 24 12
-1.000000 1.000000 1.000000 0.000000 0.000000 1.000000
1.000000 -1.000000 1.000000 0.000000 0.000000 1.000000
1.000000 1.000000 1.000000 0.000000 0.000000 1.000000
1.000000 -1.000000 1.000000 0.000000 -1.000000 0.000000
-1.000000 -1.000000 -1.000000 0.000000 -1.000000 0.000000
1.000000 -1.000000 -1.000000 0.000000 -1.000000 0.000000
-1.000000 -1.000000 1.000000 -1.000000 0.000000 0.000000
-1.000000 1.000000 -1.000000 -1.000000 0.000000 0.000000
-1.000000 -1.000000 -1.000000 -1.000000 0.000000 0.000000
1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000
-1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000
-1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000
1.000000 1.000000 1.000000 1.000000 0.000000 -0.000000
1.000000 -1.000000 -1.000000 1.000000 0.000000 -0.000000
1.000000 1.000000 -1.000000 1.000000 0.000000 -0.000000
-1.000000 1.000000 1.000000 0.000000 1.000000 -0.000000
1.000000 1.000000 -1.000000 0.000000 1.000000 -0.000000
-1.000000 1.000000 -1.000000 0.000000 1.000000 -0.000000
-1.000000 -1.000000 1.000000 0.000000 -0.000000 1.000000
-1.000000 -1.000000 1.000000 0.000000 -1.000000 0.000000
-1.000000 1.000000 1.000000 -1.000000 0.000000 0.000000
1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000
1.000000 -1.000000 1.000000 1.000000 0.000000 0.000000
1.000000 1.000000 1.000000 0.000000 1.000000 -0.000000
0 1 2
3 4 5
6 7 8
9 10 11
12 13 14
15 16 17
0 18 1
3 19 4
6 20 7
9 21 10
12 22 13
15 23 16
MATERIALS 1
Material.001
MATERIAL Material.001
1 1 1 1
0 0 0 1
0 0 0 0 1
0 0 0 1
TEXTURES 0
27 changes: 27 additions & 0 deletions Meshes/D3D9Cube.msh
@@ -0,0 +1,27 @@
MSHX1
GROUPS 1
LABEL Cube
MATERIAL 0
GEOM 8 12
1.0 -1.0 1.0 -0.5773491859436035 0.5773491859436035 -0.5773491859436035
1.0 1.0 1.0 -0.5773491859436035 -0.5773491859436035 -0.5773491859436035
1.0 -1.0 -1.0 -0.5773491859436035 0.5773491859436035 0.5773491859436035
1.0 1.0 -1.0 -0.5773491859436035 -0.5773491859436035 0.5773491859436035
-1.0 -1.0 1.0 0.5773491859436035 0.5773491859436035 -0.5773491859436035
-1.0 1.0 1.0 0.5773491859436035 -0.5773491859436035 -0.5773491859436035
-1.0 -1.0 -1.0 0.5773491859436035 0.5773491859436035 0.5773491859436035
-1.0 1.0 -1.0 0.5773491859436035 -0.5773491859436035 0.5773491859436035
0 3 2
3 0 1
2 7 6
7 2 3
6 5 4
5 6 7
4 1 0
1 4 5
2 4 0
4 2 6
7 1 5
1 7 3
MATERIALS 0
TEXTURES 0
2 changes: 1 addition & 1 deletion OVP/D3D9Client/AtmoControls.cpp
Expand Up @@ -390,7 +390,7 @@ void SetVisual(vObject *vo)

if (!hDlg || !dwCmd) return;

OBJHANDLE hObj = vo->GetObjectA();
OBJHANDLE hObj = vo->GetObjHandle();

if (oapiGetObjectType(hObj)!=OBJTP_PLANET) {
LogErr("Invalid Object Type in AtmoControls");
Expand Down
2 changes: 1 addition & 1 deletion OVP/D3D9Client/BeaconArray.cpp
Expand Up @@ -27,7 +27,7 @@ BeaconArray::BeaconArray(BeaconArrayEntry *pEnt, DWORD nEntry, vBase *_vB)
{
_TRACE;

if (vB) hBase = vB->GetObject();
if (vB) hBase = vB->GetObjHandle();

pBeaconPos = new BeaconPos[nEntry];

Expand Down
3 changes: 3 additions & 0 deletions OVP/D3D9Client/CMakeLists.txt
Expand Up @@ -142,6 +142,8 @@ set(ShaderFiles
${ShaderDir}/NewPlanet.hlsl
${ShaderDir}/Scatter.hlsl
${ShaderDir}/Glare.hlsl
${ShaderDir}/PreBakeLights.hlsl
${ShaderDir}/Custom.hlsl
${ShaderDir}/Mesh.fx
${ShaderDir}/Metalness.fx
${ShaderDir}/Particle.fx
Expand All @@ -150,6 +152,7 @@ set(ShaderFiles
${ShaderDir}/SceneTech.fx
${ShaderDir}/Sketchpad.fx
${ShaderDir}/Vessel.fx
${ShaderDir}/BakedVC.fx
)

source_group(APIHeaders FILES ${APIHeaders})
Expand Down