Skip to content

Commit

Permalink
Merge pull request #478: various improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Trass3r authored Feb 2, 2025
2 parents 0923a08 + 75ffc50 commit 895d059
Show file tree
Hide file tree
Showing 459 changed files with 829 additions and 1,791 deletions.
6 changes: 6 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@
"type": "java",
"name": "Launch Game",
"request": "launch",
"projectName": "OpenKeeper",
"mainClass": "toniarts.openkeeper.Main",
"args": "-nomovies -level mpd4 -debug",
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
},
{
"type": "java",
"name": "Launch Modelviewer",
"request": "launch",
"projectName": "OpenKeeper",
"mainClass": "toniarts.openkeeper.tools.modelviewer.ModelViewer",
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
},
]
}
18 changes: 13 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
{
"debug.autoExpandLazyVariables": true,
"debug.autoExpandLazyVariables": "on",
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.addMissingImports": true,
"source.organizeImports": "never",
"source.addMissingImports": "explicit"
},
"editor.formatOnSaveMode": "modifications",
"java.autobuild.enabled": true,
"java.cleanup.actionsOnSave": [
"addOverride",
"invertEquals",
//"invertEquals",
"instanceofPatternMatch",
"lambdaExpression",
//"switchExpression",
"tryWithResource",
],
"java.completion.importOrder": ["", "#"], // sort imports alphabetically
"java.completion.importOrder": [""], // sort imports alphabetically
"java.compile.nullAnalysis.mode": "automatic",
"java.debug.settings.hotCodeReplace": "auto",
"java.debug.settings.stepping.skipClasses": [
"$JDK",
"$Libraries",
],
"java.debug.settings.stepping.skipStaticInitializers": true,
"java.debug.settings.stepping.skipSynthetics": true,
"java.debug.settings.stepping.skipConstructors": false,
"java.references.includeDecompiledSources": true,
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"label": "build",
"type": "shell",
"command": "gradlew build --parallel --no-daemon",
"command": "gradlew compileJava --parallel --no-daemon --warning-mode all",
"problemMatcher": "$gradle",
"group": {
"kind": "build",
Expand Down
43 changes: 27 additions & 16 deletions assets/MatDefs/LightingSprite.j3md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ MaterialDef Phong Lighting {
Int NumberOfTiles : 1
Int Speed

Int BoundDrawBuffer

// Compute vertex lighting in the shader
// For better performance
Boolean VertexLighting
Expand Down Expand Up @@ -70,6 +72,9 @@ MaterialDef Phong Lighting {
// The glow color of the object
Color GlowColor

//The type of normal map: -1.0 (DirectX = default), 1.0 (OpenGl)
Float NormalType

// Parameters for fresnel
// X = bias
// Y = scale
Expand Down Expand Up @@ -133,11 +138,11 @@ MaterialDef Phong Lighting {
Float ExpSqFog
}

Technique {
Technique {
LightMode SinglePass

VertexShader GLSL310 GLSL300 GLSL100 GLSL150: Shaders/SPLightingSprite.vert
FragmentShader GLSL310 GLSL300 GLSL100 GLSL150: Shaders/SPLightingSprite.frag
VertexShader GLSL310 GLSL300 GLSL150: Shaders/LightingSprite.vert
FragmentShader GLSL310 GLSL300 GLSL150: Shaders/LightingSprite.frag

WorldParameters {
WorldViewProjectionMatrix
Expand All @@ -153,6 +158,7 @@ MaterialDef Phong Lighting {
}

Defines {
BOUND_DRAW_BUFFER: BoundDrawBuffer
VERTEX_COLOR : UseVertexColor
VERTEX_LIGHTING : VertexLighting
MATERIAL_COLORS : UseMaterialColors
Expand All @@ -173,6 +179,7 @@ MaterialDef Phong Lighting {
INSTANCING : UseInstancing
NUM_MORPH_TARGETS: NumberOfMorphTargets
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
NORMAL_TYPE: NormalType

// fog - jayfella
USE_FOG : UseFog
Expand All @@ -186,8 +193,8 @@ MaterialDef Phong Lighting {

LightMode MultiPass

VertexShader GLSL310 GLSL300 GLSL100 GLSL150: Shaders/LightingSprite.vert
FragmentShader GLSL310 GLSL300 GLSL100 GLSL150: Shaders/LightingSprite.frag
VertexShader GLSL310 GLSL300 GLSL150: Shaders/LightingSprite.vert
FragmentShader GLSL310 GLSL300 GLSL150: Shaders/LightingSprite.frag

WorldParameters {
WorldViewProjectionMatrix
Expand All @@ -203,6 +210,7 @@ MaterialDef Phong Lighting {
}

Defines {
BOUND_DRAW_BUFFER: BoundDrawBuffer
VERTEX_COLOR : UseVertexColor
VERTEX_LIGHTING : VertexLighting
MATERIAL_COLORS : UseMaterialColors
Expand All @@ -223,6 +231,7 @@ MaterialDef Phong Lighting {
INSTANCING : UseInstancing
NUM_MORPH_TARGETS: NumberOfMorphTargets
NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers
NORMAL_TYPE: NormalType

// fog - jayfella
USE_FOG : UseFog
Expand All @@ -232,12 +241,10 @@ MaterialDef Phong Lighting {
}
}



Technique PreShadow {

VertexShader GLSL310 GLSL300 GLSL100 GLSL150 : Shaders/PreShadowSprite.vert
FragmentShader GLSL310 GLSL300 GLSL100 GLSL150 : Shaders/PreShadowSprite.frag
VertexShader GLSL310 GLSL300 GLSL150: Shaders/LightingSprite.vert
FragmentShader GLSL310 GLSL300 GLSL150: Shaders/LightingSprite.frag

WorldParameters {
WorldViewProjectionMatrix
Expand All @@ -250,6 +257,7 @@ MaterialDef Phong Lighting {
}

Defines {
BOUND_DRAW_BUFFER: BoundDrawBuffer
DISCARD_ALPHA : AlphaDiscardThreshold
NUM_BONES : NumberOfBones
INSTANCING : UseInstancing
Expand All @@ -267,9 +275,9 @@ MaterialDef Phong Lighting {

}

Technique PostShadow{
VertexShader GLSL310 GLSL300 GLSL100 GLSL150: Shaders/PostShadowSprite.vert
FragmentShader GLSL310 GLSL300 GLSL100 GLSL150: Shaders/PostShadowSprite.frag
Technique PostShadow {
VertexShader GLSL310 GLSL300 GLSL150: Shaders/PostShadowSprite.vert
FragmentShader GLSL310 GLSL300 GLSL150: Shaders/PostShadowSprite.frag

WorldParameters {
WorldViewProjectionMatrix
Expand All @@ -283,6 +291,7 @@ MaterialDef Phong Lighting {
}

Defines {
BOUND_DRAW_BUFFER: BoundDrawBuffer
HARDWARE_SHADOWS : HardwareShadows
FILTER_MODE : FilterMode
PCFEDGE : PCFEdge
Expand All @@ -307,8 +316,8 @@ MaterialDef Phong Lighting {

Technique PreNormalPass {

VertexShader GLSL310 GLSL300 GLSL100 GLSL150 : Common/MatDefs/SSAO/normal.vert
FragmentShader GLSL310 GLSL300 GLSL100 GLSL150 : Common/MatDefs/SSAO/normal.frag
VertexShader GLSL310 GLSL300 GLSL150: Common/MatDefs/SSAO/normal.vert
FragmentShader GLSL310 GLSL300 GLSL150: Common/MatDefs/SSAO/normal.frag

WorldParameters {
WorldViewProjectionMatrix
Expand All @@ -319,6 +328,7 @@ MaterialDef Phong Lighting {
}

Defines {
BOUND_DRAW_BUFFER: BoundDrawBuffer
DIFFUSEMAP_ALPHA : DiffuseMap
NUM_BONES : NumberOfBones
INSTANCING : UseInstancing
Expand All @@ -330,8 +340,8 @@ MaterialDef Phong Lighting {

Technique Glow {

VertexShader GLSL310 GLSL300 GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.vert
FragmentShader GLSL310 GLSL300 GLSL100 GLSL150: Common/MatDefs/Light/Glow.frag
VertexShader GLSL310 GLSL300 GLSL150: Common/MatDefs/Misc/Unshaded.vert
FragmentShader GLSL310 GLSL300 GLSL150: Common/MatDefs/Light/Glow.frag

WorldParameters {
WorldViewProjectionMatrix
Expand All @@ -340,6 +350,7 @@ MaterialDef Phong Lighting {
}

Defines {
BOUND_DRAW_BUFFER: BoundDrawBuffer
NEED_TEXCOORD1
HAS_GLOWMAP : GlowMap
HAS_GLOWCOLOR : GlowColor
Expand Down
Loading

0 comments on commit 895d059

Please sign in to comment.