remove geometry shader support
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
6088080257
commit
ab17254a02
@ -800,6 +800,7 @@ Initial hitstun implementation
|
|||||||
Migrate documentation
|
Migrate documentation
|
||||||
Netcode generator qol fixes
|
Netcode generator qol fixes
|
||||||
Combat Stances Component
|
Combat Stances Component
|
||||||
|
Remove geometry shader support
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
|||||||
@ -636,7 +636,7 @@ public class Globals {
|
|||||||
assetManager.addModelPathToQueue("Models/basic/geometry/unitplane.fbx");
|
assetManager.addModelPathToQueue("Models/basic/geometry/unitplane.fbx");
|
||||||
assetManager.addModelPathToQueue("Models/basic/geometry/unitcube.fbx");
|
assetManager.addModelPathToQueue("Models/basic/geometry/unitcube.fbx");
|
||||||
imagePlaneModelID = assetManager.registerModel(RenderUtils.createPlaneModel("Shaders/core/plane/plane.vs", "Shaders/core/plane/plane.fs"));
|
imagePlaneModelID = assetManager.registerModel(RenderUtils.createPlaneModel("Shaders/core/plane/plane.vs", "Shaders/core/plane/plane.fs"));
|
||||||
assetManager.addShaderToQueue("Shaders/core/plane/plane.vs", null, "Shaders/core/plane/plane.fs");
|
assetManager.addShaderToQueue("Shaders/core/plane/plane.vs", "Shaders/core/plane/plane.fs");
|
||||||
solidPlaneModelID = assetManager.registerModel(RenderUtils.createInWindowPanel("Shaders/ui/plainBox/plainBox.vs", "Shaders/ui/plainBox/plainBox.fs"));
|
solidPlaneModelID = assetManager.registerModel(RenderUtils.createInWindowPanel("Shaders/ui/plainBox/plainBox.vs", "Shaders/ui/plainBox/plainBox.fs"));
|
||||||
|
|
||||||
//image panel
|
//image panel
|
||||||
@ -645,11 +645,11 @@ public class Globals {
|
|||||||
Globals.assetManager.addShaderToQueue("Shaders/ui/plainBox/plainBox.vs", "Shaders/ui/plainBox/plainBox.fs");
|
Globals.assetManager.addShaderToQueue("Shaders/ui/plainBox/plainBox.vs", "Shaders/ui/plainBox/plainBox.fs");
|
||||||
|
|
||||||
//window content shader
|
//window content shader
|
||||||
assetManager.addShaderToQueue("Shaders/ui/windowContent/windowContent.vs", null, "Shaders/ui/windowContent/windowContent.fs");
|
assetManager.addShaderToQueue("Shaders/ui/windowContent/windowContent.vs", "Shaders/ui/windowContent/windowContent.fs");
|
||||||
|
|
||||||
//debug shaders
|
//debug shaders
|
||||||
assetManager.addShaderToQueue("Shaders/ui/debug/windowBorder/windowBound.vs", null, "Shaders/ui/debug/windowBorder/windowBound.fs");
|
assetManager.addShaderToQueue("Shaders/ui/debug/windowBorder/windowBound.vs", "Shaders/ui/debug/windowBorder/windowBound.fs");
|
||||||
assetManager.addShaderToQueue("Shaders/ui/debug/windowContentBorder/windowContentBound.vs", null, "Shaders/ui/debug/windowContentBorder/windowContentBound.fs");
|
assetManager.addShaderToQueue("Shaders/ui/debug/windowContentBorder/windowContentBound.vs", "Shaders/ui/debug/windowContentBorder/windowContentBound.fs");
|
||||||
|
|
||||||
//as these assets are required for the renderer to work, we go ahead and
|
//as these assets are required for the renderer to work, we go ahead and
|
||||||
//load them into memory now. The loading time penalty is worth it I think.
|
//load them into memory now. The loading time penalty is worth it I think.
|
||||||
|
|||||||
@ -120,18 +120,11 @@ public class AssetManager {
|
|||||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load shaders");
|
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load shaders");
|
||||||
for(ActorShaderMask currentShader : shadersInQueue){
|
for(ActorShaderMask currentShader : shadersInQueue){
|
||||||
shadersInQueue.remove(currentShader);
|
shadersInQueue.remove(currentShader);
|
||||||
String key = getShaderKey(currentShader.getVertexShaderPath(),currentShader.getGeometryShaderPath(),currentShader.getFragmentShaderPath());
|
String key = getShaderKey(currentShader.getVertexShaderPath(),currentShader.getFragmentShaderPath());
|
||||||
if(currentShader.getGeometryShaderPath() == null){
|
shadersLoadedIntoMemory.put(
|
||||||
shadersLoadedIntoMemory.put(
|
key,
|
||||||
key,
|
ShaderProgram.loadSpecificShader(currentShader.getVertexShaderPath(),currentShader.getFragmentShaderPath())
|
||||||
ShaderProgram.loadSpecificShader(currentShader.getVertexShaderPath(),currentShader.getFragmentShaderPath())
|
);
|
||||||
);
|
|
||||||
} else {
|
|
||||||
shadersLoadedIntoMemory.put(
|
|
||||||
key,
|
|
||||||
ShaderProgram.loadSpecificShader(currentShader.getVertexShaderPath(),currentShader.getGeometryShaderPath(),currentShader.getFragmentShaderPath())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//pose models
|
//pose models
|
||||||
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load pose models");
|
LoggerInterface.loggerEngine.DEBUG_LOOP("AssetManager - Load pose models");
|
||||||
@ -396,15 +389,11 @@ public class AssetManager {
|
|||||||
//SHADERS
|
//SHADERS
|
||||||
//
|
//
|
||||||
public void addShaderToQueue(String vertexShader, String fragmentShader){
|
public void addShaderToQueue(String vertexShader, String fragmentShader){
|
||||||
shadersInQueue.add(new ActorShaderMask("","",vertexShader,null,fragmentShader));
|
shadersInQueue.add(new ActorShaderMask("","",vertexShader,fragmentShader));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addShaderToQueue(String vertexShader, String geometryShader, String fragmentShader){
|
public ShaderProgram fetchShader(String vertexPath, String fragmentPath){
|
||||||
shadersInQueue.add(new ActorShaderMask("","",vertexShader,geometryShader,fragmentShader));
|
String path = getShaderKey(vertexPath,fragmentPath);
|
||||||
}
|
|
||||||
|
|
||||||
public ShaderProgram fetchShader(String vertexPath, String geometryShader, String fragmentPath){
|
|
||||||
String path = getShaderKey(vertexPath,geometryShader,fragmentPath);
|
|
||||||
ShaderProgram rVal = null;
|
ShaderProgram rVal = null;
|
||||||
if(shadersLoadedIntoMemory.containsKey(path)){
|
if(shadersLoadedIntoMemory.containsKey(path)){
|
||||||
rVal = shadersLoadedIntoMemory.get(path);
|
rVal = shadersLoadedIntoMemory.get(path);
|
||||||
@ -412,8 +401,8 @@ public class AssetManager {
|
|||||||
return rVal;
|
return rVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
static String getShaderKey(String vertexPath, String geometryPath, String fragmentPath){
|
static String getShaderKey(String vertexPath, String fragmentPath){
|
||||||
return vertexPath + "-" + geometryPath + "-" + fragmentPath;
|
return vertexPath + "-" + fragmentPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -422,10 +411,7 @@ public class AssetManager {
|
|||||||
public void forceReloadAllShaders(){
|
public void forceReloadAllShaders(){
|
||||||
for(String shaderKey : shadersLoadedIntoMemory.keySet()){
|
for(String shaderKey : shadersLoadedIntoMemory.keySet()){
|
||||||
String shaderPaths[] = shaderKey.split("-");
|
String shaderPaths[] = shaderKey.split("-");
|
||||||
if(shaderPaths[1].equals("null")){
|
shadersInQueue.add(new ActorShaderMask("","",shaderPaths[0],shaderPaths[1]));
|
||||||
shaderPaths[1] = null;
|
|
||||||
}
|
|
||||||
shadersInQueue.add(new ActorShaderMask("","",shaderPaths[0],shaderPaths[1],shaderPaths[2]));
|
|
||||||
}
|
}
|
||||||
shadersLoadedIntoMemory.clear();
|
shadersLoadedIntoMemory.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -613,18 +613,7 @@ public class Actor {
|
|||||||
* @param fragmentShader the fragment shader to apply
|
* @param fragmentShader the fragment shader to apply
|
||||||
*/
|
*/
|
||||||
public void maskShader(String mesh, String vertexShader, String fragmentShader){
|
public void maskShader(String mesh, String vertexShader, String fragmentShader){
|
||||||
shaderMasks.add(new ActorShaderMask(this.modelPath, mesh, vertexShader, null, fragmentShader));
|
shaderMasks.add(new ActorShaderMask(this.modelPath, mesh, vertexShader, fragmentShader));
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Masks a shader with another shader
|
|
||||||
* @param mesh the mesh to apply the mask on
|
|
||||||
* @param vertexShader the vertex shader to apply
|
|
||||||
* @param geometryShader the geometry shader to apply
|
|
||||||
* @param fragmentShader the fragment shader to apply
|
|
||||||
*/
|
|
||||||
public void maskShader(String mesh, String vertexShader, String geometryShader, String fragmentShader){
|
|
||||||
shaderMasks.add(new ActorShaderMask(this.modelPath, mesh, vertexShader, geometryShader, fragmentShader));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -11,8 +11,6 @@ public class ActorShaderMask {
|
|||||||
String meshName;
|
String meshName;
|
||||||
//the vertex shader
|
//the vertex shader
|
||||||
String vertexShaderPath;
|
String vertexShaderPath;
|
||||||
//the geometry shader
|
|
||||||
String geometryShaderPath;
|
|
||||||
//the fragment shader
|
//the fragment shader
|
||||||
String fragmentShaderPath;
|
String fragmentShaderPath;
|
||||||
|
|
||||||
@ -21,14 +19,12 @@ public class ActorShaderMask {
|
|||||||
* @param modelName
|
* @param modelName
|
||||||
* @param meshName
|
* @param meshName
|
||||||
* @param vertexShaderPath
|
* @param vertexShaderPath
|
||||||
* @param geometryShaderPath
|
|
||||||
* @param fragmentShaderPath
|
* @param fragmentShaderPath
|
||||||
*/
|
*/
|
||||||
public ActorShaderMask(String modelName, String meshName, String vertexShaderPath, String geometryShaderPath, String fragmentShaderPath){
|
public ActorShaderMask(String modelName, String meshName, String vertexShaderPath, String fragmentShaderPath){
|
||||||
this.modelName = modelName;
|
this.modelName = modelName;
|
||||||
this.meshName = meshName;
|
this.meshName = meshName;
|
||||||
this.vertexShaderPath = vertexShaderPath;
|
this.vertexShaderPath = vertexShaderPath;
|
||||||
this.geometryShaderPath = geometryShaderPath;
|
|
||||||
this.fragmentShaderPath = fragmentShaderPath;
|
this.fragmentShaderPath = fragmentShaderPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,14 +52,6 @@ public class ActorShaderMask {
|
|||||||
return vertexShaderPath;
|
return vertexShaderPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the geometry shader path
|
|
||||||
* @return the geometry shader path
|
|
||||||
*/
|
|
||||||
public String getGeometryShaderPath(){
|
|
||||||
return geometryShaderPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the fragment shader path
|
* Gets the fragment shader path
|
||||||
* @return the fragment shader path
|
* @return the fragment shader path
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public class InstanceManager {
|
|||||||
data.fillBuffers();
|
data.fillBuffers();
|
||||||
|
|
||||||
//fetch model/shader and draw if both available
|
//fetch model/shader and draw if both available
|
||||||
ShaderProgram shader = Globals.assetManager.fetchShader(data.getVertexShader(), null, data.getFragmentShader());
|
ShaderProgram shader = Globals.assetManager.fetchShader(data.getVertexShader(), data.getFragmentShader());
|
||||||
Model model = Globals.assetManager.fetchModel(modelPath);
|
Model model = Globals.assetManager.fetchModel(modelPath);
|
||||||
if(model != null && shader != null){
|
if(model != null && shader != null){
|
||||||
openGLState.setActiveShader(renderPipelineState, shader);
|
openGLState.setActiveShader(renderPipelineState, shader);
|
||||||
|
|||||||
@ -62,7 +62,7 @@ public class TextureInstancedActor {
|
|||||||
*/
|
*/
|
||||||
public void draw(RenderPipelineState renderPipelineState, OpenGLState openGLState){
|
public void draw(RenderPipelineState renderPipelineState, OpenGLState openGLState){
|
||||||
Model model = Globals.assetManager.fetchModel(modelPath);
|
Model model = Globals.assetManager.fetchModel(modelPath);
|
||||||
ShaderProgram shader = Globals.assetManager.fetchShader(vertexShaderPath, null, fragmentShaderPath);
|
ShaderProgram shader = Globals.assetManager.fetchShader(vertexShaderPath, fragmentShaderPath);
|
||||||
if(model != null && shader != null){
|
if(model != null && shader != null){
|
||||||
//setup render pipeline
|
//setup render pipeline
|
||||||
boolean instancedState = renderPipelineState.getInstanced();
|
boolean instancedState = renderPipelineState.getInstanced();
|
||||||
|
|||||||
@ -65,7 +65,7 @@ public class DebugRendering {
|
|||||||
planeModel = Globals.assetManager.fetchModel(Globals.imagePlaneModelID);
|
planeModel = Globals.assetManager.fetchModel(Globals.imagePlaneModelID);
|
||||||
}
|
}
|
||||||
if(elementDrawDebugProgram == null){
|
if(elementDrawDebugProgram == null){
|
||||||
elementDrawDebugProgram = Globals.assetManager.fetchShader("Shaders/ui/debug/windowContentBorder/windowContentBound.vs", null, "Shaders/ui/debug/windowContentBorder/windowContentBound.fs");
|
elementDrawDebugProgram = Globals.assetManager.fetchShader("Shaders/ui/debug/windowContentBorder/windowContentBound.vs", "Shaders/ui/debug/windowContentBorder/windowContentBound.fs");
|
||||||
}
|
}
|
||||||
if(elementDrawDebugProgram != null && planeModel != null){
|
if(elementDrawDebugProgram != null && planeModel != null){
|
||||||
parentFramebuffer.bind(Globals.renderingEngine.getOpenGLState());
|
parentFramebuffer.bind(Globals.renderingEngine.getOpenGLState());
|
||||||
@ -89,7 +89,7 @@ public class DebugRendering {
|
|||||||
planeModel = Globals.assetManager.fetchModel(Globals.imagePlaneModelID);
|
planeModel = Globals.assetManager.fetchModel(Globals.imagePlaneModelID);
|
||||||
}
|
}
|
||||||
if(windowDrawDebugProgram == null){
|
if(windowDrawDebugProgram == null){
|
||||||
windowDrawDebugProgram = Globals.assetManager.fetchShader("Shaders/ui/debug/windowBorder/windowBound.vs", null, "Shaders/ui/debug/windowBorder/windowBound.fs");
|
windowDrawDebugProgram = Globals.assetManager.fetchShader("Shaders/ui/debug/windowBorder/windowBound.vs", "Shaders/ui/debug/windowBorder/windowBound.fs");
|
||||||
}
|
}
|
||||||
if(windowDrawDebugProgram != null && planeModel != null){
|
if(windowDrawDebugProgram != null && planeModel != null){
|
||||||
parentFramebuffer.bind(Globals.renderingEngine.getOpenGLState());
|
parentFramebuffer.bind(Globals.renderingEngine.getOpenGLState());
|
||||||
|
|||||||
@ -259,7 +259,7 @@ public class Model {
|
|||||||
if(shaderMask.containsKey(mesh.getMeshName())){
|
if(shaderMask.containsKey(mesh.getMeshName())){
|
||||||
ActorShaderMask specificMask = shaderMask.get(mesh.getMeshName());
|
ActorShaderMask specificMask = shaderMask.get(mesh.getMeshName());
|
||||||
ShaderProgram overwriteShader = null;
|
ShaderProgram overwriteShader = null;
|
||||||
if((overwriteShader = Globals.assetManager.fetchShader(specificMask.getVertexShaderPath(), specificMask.getGeometryShaderPath(), specificMask.getFragmentShaderPath())) != null){
|
if((overwriteShader = Globals.assetManager.fetchShader(specificMask.getVertexShaderPath(), specificMask.getFragmentShaderPath())) != null){
|
||||||
rVal = overwriteShader;
|
rVal = overwriteShader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ public class OutlineNormalsPipeline implements RenderPipeline {
|
|||||||
//
|
//
|
||||||
|
|
||||||
RenderingEngine.normalsOutlineFrambuffer.bind(openGLState);
|
RenderingEngine.normalsOutlineFrambuffer.bind(openGLState);
|
||||||
ShaderProgram program = Globals.assetManager.fetchShader("Shaders/core/anime/outlineNormals.vs", null, "Shaders/core/anime/outlineNormals.fs");
|
ShaderProgram program = Globals.assetManager.fetchShader("Shaders/core/anime/outlineNormals.vs", "Shaders/core/anime/outlineNormals.fs");
|
||||||
if(program != null){
|
if(program != null){
|
||||||
openGLState.setActiveShader(renderPipelineState, program);
|
openGLState.setActiveShader(renderPipelineState, program);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user