1
0
mirror of synced 2024-09-24 03:28:21 +02:00

Gamma fix pbr diffuse color

This commit is contained in:
KillzXGaming 2019-06-12 15:57:24 -04:00
parent 92b5ade4ae
commit 05516ed3df
9 changed files with 16 additions and 5 deletions

Binary file not shown.

View File

@ -156,6 +156,12 @@ namespace FirstPlugin.Forms
public bool IsLoaded = false;
public void DisplayAllDDrawables()
{
if (viewport != null && Runtime.UseOpenGL && Runtime.DisplayViewport)
viewport.DisplayAllDDrawables();
}
private BFRES ActiveBfres;
public void LoadViewport(BFRES bfres, bool HasShapes, DrawableContainer ActiveDrawable, List<ToolStripMenuItem> customContextMenus = null)
{

View File

@ -248,6 +248,7 @@ namespace FirstPlugin
{
BfresEditor bfresEditor = (BfresEditor)LibraryGUI.Instance.GetActiveContent(typeof(BfresEditor));
bfresEditor.IsLoaded = false;
bfresEditor.DisplayAllDDrawables();
}
}

View File

@ -26,6 +26,8 @@ namespace Switch_Toolbox.Library
Runtime.ViewportEditor editor;
public void DisplayAllDDrawables() { drawContainersCB.SelectedIndex = 0; }
public Viewport(List<DrawableContainer> container, bool LoadDrawables = true)
{
DrawableContainers = container;

View File

@ -243,12 +243,14 @@ void main()
vec3 albedo = vec3(1);
if (HasDiffuse == 1)
albedo = pow(texture(DiffuseMap , f_texcoord0).rgb, vec3(gamma));
{
vec4 DiffuseTex = pow(texture(DiffuseMap, f_texcoord0).rgba, vec4(gamma));
//Comp Selectors
albedo.r = GetComponent(RedChannel, texture(DiffuseMap, f_texcoord0));
albedo.g = GetComponent(GreenChannel, texture(DiffuseMap, f_texcoord0));
albedo.b = GetComponent(BlueChannel, texture(DiffuseMap, f_texcoord0));
//Comp Selectors
albedo.r = GetComponent(RedChannel, DiffuseTex);
albedo.g = GetComponent(GreenChannel, DiffuseTex);
albedo.b = GetComponent(BlueChannel, DiffuseTex);
}
float metallic = 0;
if (HasMetalnessMap == 1)