Merge branch 'master' of https://github.com/highfidelity/hifi into one

This commit is contained in:
samcake 2018-05-09 15:16:48 -07:00
commit 652c754373
12 changed files with 71 additions and 72 deletions

View file

@ -787,7 +787,7 @@ Rectangle {
} }
lightboxPopup.button2text = "CONFIRM"; lightboxPopup.button2text = "CONFIRM";
lightboxPopup.button2method = function() { lightboxPopup.button2method = function() {
Commerce.replaceContentSet(root.itemHref); Commerce.replaceContentSet(root.itemHref, root.certificateId);
lightboxPopup.visible = false; lightboxPopup.visible = false;
rezzedNotifContainer.visible = true; rezzedNotifContainer.visible = true;
rezzedNotifContainerTimer.start(); rezzedNotifContainerTimer.start();

View file

@ -17,7 +17,6 @@ std::string GL41Backend::getBackendShaderHeader() const {
static const std::string header( static const std::string header(
R"SHADER(#version 410 core R"SHADER(#version 410 core
#define GPU_GL410 #define GPU_GL410
#define PRECISIONQ
#define BITFIELD int #define BITFIELD int
)SHADER"); )SHADER");
return header; return header;

View file

@ -18,7 +18,6 @@ std::string GL45Backend::getBackendShaderHeader() const {
static const std::string header( static const std::string header(
R"SHADER(#version 450 core R"SHADER(#version 450 core
#define GPU_GL450 #define GPU_GL450
#define PRECISIONQ
#define BITFIELD int #define BITFIELD int
)SHADER" )SHADER"
#ifdef GPU_SSBO_TRANSFORM_OBJECT #ifdef GPU_SSBO_TRANSFORM_OBJECT

View file

@ -17,10 +17,9 @@ std::string GLESBackend::getBackendShaderHeader() const {
static const std::string header( static const std::string header(
R"SHADER(#version 310 es R"SHADER(#version 310 es
#extension GL_EXT_texture_buffer : enable #extension GL_EXT_texture_buffer : enable
precision lowp float; // check precision 2 precision highp float;
precision lowp samplerBuffer; precision highp samplerBuffer;
precision lowp sampler2DShadow; precision highp sampler2DShadow;
#define PRECISIONQ highp
#define BITFIELD highp int #define BITFIELD highp int
)SHADER"); )SHADER");
return header; return header;

View file

@ -50,47 +50,50 @@ enum Type : uint8_t {
}; };
// Array providing the size in bytes for a given scalar type // Array providing the size in bytes for a given scalar type
static const int TYPE_SIZE[NUM_TYPES] = { static const int TYPE_SIZE[NUM_TYPES] = {
4, 4, // FLOAT
4, 4, // INT32
4, 4, // UINT32
2, 2, // HALF
2, 2, // INT16
2, 2, // UINT16
1, 1, // INT8
1, 1, // UINT8
// normalized values // normalized values
4, 4, // NINT32
4, 4, // NUINT32
2, 2, // NINT16
2, 2, // NUINT16
1, 1, // NINT8
1, 1, // NUINT8
4, 1, // NUINT2
1, // NINT2_10_10_10
1 1, // COMPRESSED
}; };
// Array answering the question Does this type is integer or not // Array answering the question Does this type is integer or not
static const bool TYPE_IS_INTEGER[NUM_TYPES] = { static const bool TYPE_IS_INTEGER[NUM_TYPES] = {
false, false, // FLOAT
true, true, // INT32
true, true, // UINT32
false, false, // HALF
true, true, // INT16
true, true, // UINT16
true, true, // INT8
true, true, // UINT8
// Normalized values // Normalized values
false, false, // NINT32
false, false, // NUINT32
false, false, // NINT16
false, false, // NUINT16
false, false, // NINT8
false, false, // NUINT8
false, false, // NUINT2
false, // NINT2_10_10_10
false, false, // COMPRESSED
}; };
// Dimension of an Element // Dimension of an Element
@ -367,9 +370,9 @@ public:
static const Element PART_DRAWCALL; static const Element PART_DRAWCALL;
protected: protected:
uint8 _semantic; uint16 _semantic : 7;
uint8 _dimension : 4; uint16 _dimension : 4;
uint8 _type : 4; uint16 _type : 5;
}; };

View file

@ -34,7 +34,7 @@ vec3 getLightIrradiance(Light l) { return lightIrradiance_getIrradiance(l.irradi
// Light Ambient // Light Ambient
struct LightAmbient { struct LightAmbient {
PRECISIONQ vec4 _ambient; vec4 _ambient;
SphericalHarmonics _ambientSphere; SphericalHarmonics _ambientSphere;
mat4 transform; mat4 transform;
}; };

View file

@ -14,9 +14,9 @@
#define LightIrradianceConstRef LightIrradiance #define LightIrradianceConstRef LightIrradiance
struct LightIrradiance { struct LightIrradiance {
PRECISIONQ vec4 colorIntensity; vec4 colorIntensity;
// falloffRadius, cutoffRadius, falloffSpot, spare // falloffRadius, cutoffRadius, falloffSpot, spare
PRECISIONQ vec4 attenuation; vec4 attenuation;
}; };

View file

@ -16,8 +16,8 @@
#define LightVolumeConstRef LightVolume #define LightVolumeConstRef LightVolume
struct LightVolume { struct LightVolume {
PRECISIONQ vec4 positionRadius; vec4 positionRadius;
PRECISIONQ vec4 directionSpotCos; vec4 directionSpotCos;
}; };
bool lightVolume_isPoint(LightVolume lv) { return bool(lv.directionSpotCos.w < 0.f); } bool lightVolume_isPoint(LightVolume lv) { return bool(lv.directionSpotCos.w < 0.f); }

View file

@ -15,10 +15,10 @@
// to what is provided by the uniform buffer, or the material key has the wrong bits // to what is provided by the uniform buffer, or the material key has the wrong bits
struct Material { struct Material {
PRECISIONQ vec4 _emissiveOpacity; vec4 _emissiveOpacity;
PRECISIONQ vec4 _albedoRoughness; vec4 _albedoRoughness;
PRECISIONQ vec4 _fresnelMetallic; vec4 _fresnelMetallic;
PRECISIONQ vec4 _scatteringSpare2Key; vec4 _scatteringSpare2Key;
}; };
uniform materialBuffer { uniform materialBuffer {
@ -64,7 +64,4 @@ const BITFIELD OCCLUSION_MAP_BIT = 0x00004000;
const BITFIELD LIGHTMAP_MAP_BIT = 0x00008000; const BITFIELD LIGHTMAP_MAP_BIT = 0x00008000;
const BITFIELD SCATTERING_MAP_BIT = 0x00010000; const BITFIELD SCATTERING_MAP_BIT = 0x00010000;
#ifdef GL_ES
precision lowp float;
#endif
<@endif@> <@endif@>

View file

@ -16,15 +16,15 @@
#define SphericalHarmonicsConstRef SphericalHarmonics #define SphericalHarmonicsConstRef SphericalHarmonics
struct SphericalHarmonics { struct SphericalHarmonics {
PRECISIONQ vec4 L00; vec4 L00;
PRECISIONQ vec4 L1m1; vec4 L1m1;
PRECISIONQ vec4 L10; vec4 L10;
PRECISIONQ vec4 L11; vec4 L11;
PRECISIONQ vec4 L2m2; vec4 L2m2;
PRECISIONQ vec4 L2m1; vec4 L2m1;
PRECISIONQ vec4 L20; vec4 L20;
PRECISIONQ vec4 L21; vec4 L21;
PRECISIONQ vec4 L22; vec4 L22;
}; };
vec4 sphericalHarmonics_evalSphericalLight(SphericalHarmonicsConstRef sh, vec3 direction) { vec4 sphericalHarmonics_evalSphericalLight(SphericalHarmonicsConstRef sh, vec3 direction) {

View file

@ -14,10 +14,10 @@
<@func declareLightingModel()@> <@func declareLightingModel()@>
struct LightingModel { struct LightingModel {
PRECISIONQ vec4 _UnlitEmissiveLightmapBackground; vec4 _UnlitEmissiveLightmapBackground;
PRECISIONQ vec4 _ScatteringDiffuseSpecularAlbedo; vec4 _ScatteringDiffuseSpecularAlbedo;
PRECISIONQ vec4 _AmbientDirectionalPointSpot; vec4 _AmbientDirectionalPointSpot;
PRECISIONQ vec4 _ShowContourObscuranceWireframe; vec4 _ShowContourObscuranceWireframe;
}; };
uniform lightingModelBuffer{ uniform lightingModelBuffer{

View file

@ -106,9 +106,10 @@ public slots:
void mute(const QUuid& nodeID); void mute(const QUuid& nodeID);
/**jsdoc /**jsdoc
* Get the user name and machine fingerprint associated with the given UUID. This will only do anything if you're an admin * Request the user name and machine fingerprint associated with the given UUID. The user name will be returned in a
* of the domain you're in. * {@link Users.usernameFromIDReply|usernameFromIDReply} signal. This will only do anything if you're an admin of the domain
* @function Users.getUsernameFromID * you're in.
* @function Users.requestUsernameFromID
* @param {Uuid} nodeID The node or session ID of the user whose user name you want. * @param {Uuid} nodeID The node or session ID of the user whose user name you want.
*/ */
void requestUsernameFromID(const QUuid& nodeID); void requestUsernameFromID(const QUuid& nodeID);
@ -170,7 +171,8 @@ signals:
void enteredIgnoreRadius(); void enteredIgnoreRadius();
/**jsdoc /**jsdoc
* Notifies scripts of the user name and machine fingerprint associated with a UUID. * Triggered in response to a {@link Users.requestUsernameFromID|requestUsernameFromID} call. Provides the user name and
* machine fingerprint associated with a UUID.
* Username and machineFingerprint will be their default constructor output if the requesting user isn't an admin. * Username and machineFingerprint will be their default constructor output if the requesting user isn't an admin.
* @function Users.usernameFromIDReply * @function Users.usernameFromIDReply
* @param {Uuid} nodeID * @param {Uuid} nodeID