mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-10 07:04:36 +00:00
Gamma fix pbr diffuse color
This commit is contained in:
parent
92b5ade4ae
commit
05516ed3df
9 changed files with 16 additions and 5 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -248,6 +248,7 @@ namespace FirstPlugin
|
|||
{
|
||||
BfresEditor bfresEditor = (BfresEditor)LibraryGUI.Instance.GetActiveContent(typeof(BfresEditor));
|
||||
bfresEditor.IsLoaded = false;
|
||||
bfresEditor.DisplayAllDDrawables();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue