Permalink
Browse files

Updates to shpping shaders for 3ds Max 2019: Update 2

  • Loading branch information...
Zap Andersson
Zap Andersson committed Sep 20, 2018
1 parent 61b0e76 commit f19842e07dbae1cb8131cd89213e7a8c75148de3
@@ -1,6 +1,6 @@
// A shader that emulats a 7-segmend numerical display
// A shader that emulates a 7-segment numerical display
// Digits.osl by Zap Andersson
// Modified: 2018-02-08
// Modified: 2018-05-04
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
@@ -1,6 +1,6 @@
// Lookup a bitmap bitmap with OSL
// OSLBitmap.osl, by Zap Andersson
// Modified: 2018-02-08
// Modified: 2018-04-25
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
@@ -45,7 +45,16 @@ shader OSLBitmap
int channels;
gettextureinfo(Filename, "channels", channels);
if (channels < 4) // No alpha? Set it to opaque
{
A = 1.0;
if (WrapMode == "black") // 2018-04-25: Allow Decals
{
if (p[0] < 0.0 || p[0] > 1.0 ||
p[1] < 0.0 || p[1] > 1.0)
A = 0.0;
}
}
// Temporary workaround for color space issues
@@ -1,6 +1,6 @@
// Load a bitmap into OSL (UBER version, with everything built-in)
// UberBitmap.osl, by Zap Andersson
// Modified: 2018-02-08
// Modified: 2018-04-25
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
@@ -82,8 +82,17 @@ shader UberBitmap
int channels;
gettextureinfo(Filename, "channels", channels);
if (channels < 4) // No alpha? Set it to opaque
{
A = 1.0;
if (WrapMode == "black") // 2018-04-25: Allow Decals
{
if (p[0] < 0.0 || p[0] > 1.0 ||
p[1] < 0.0 || p[1] > 1.0)
A = 0.0;
}
}
// Temporary workaround for color space issues
if (AutoGamma)
{

0 comments on commit f19842e

Please sign in to comment.