text stringlengths 7 35.3M | id stringlengths 11 185 | metadata dict | __index_level_0__ int64 0 2.14k |
|---|---|---|---|
/*
(C) 2019 David Lettier
lettier.com
*/
#version 150
#define NUMBER_OF_LIGHTS 4
#define MAX_SHININESS 127.75
#define MAX_FRESNEL_POWER 5.0
uniform float osg_FrameTime;
uniform vec2 pi;
uniform vec2 gamma;
uniform mat4 trans_world_to_view;
uniform mat4 trans_view_to_world;
uniform sampler2D p3d_Textu... | 3d-game-shaders-for-beginners/demonstration/shaders/fragment/base.frag/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/fragment/base.frag",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 4179
} | 0 |
/*
(C) 2020 David Lettier
lettier.com
*/
#version 150
uniform vec2 pi;
uniform vec2 gamma;
uniform sampler2D colorTexture;
uniform sampler2D lookupTableTexture0;
uniform sampler2D lookupTableTexture1;
uniform vec2 sunPosition;
uniform vec2 enabled;
out vec4 fragColor;
void main() {
vec2 texSize = textureSiz... | 3d-game-shaders-for-beginners/demonstration/shaders/fragment/lookup-table.frag/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/fragment/lookup-table.frag",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 662
} | 1 |
/*
(C) 2019 David Lettier
lettier.com
*/
#version 150
uniform sampler2D colorTexture;
uniform vec2 enabled;
out vec4 fragColor;
void main() {
float amount = 0.3;
vec2 texSize = textureSize(colorTexture, 0).xy;
vec2 fragCoord = gl_FragCoord.xy;
vec2 texCoord = fragCoord / texSize;
if (enabled.x !... | 3d-game-shaders-for-beginners/demonstration/shaders/fragment/sharpen.frag/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/fragment/sharpen.frag",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 411
} | 2 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="Interested in adding textures, lighting, shadows, normal maps, glowi... | 3d-game-shaders-for-beginners/docs/chromatic-aberration.html/0 | {
"file_path": "3d-game-shaders-for-beginners/docs/chromatic-aberration.html",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 4400
} | 3 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="Interested in adding textures, lighting, shadows, normal maps, glowi... | 3d-game-shaders-for-beginners/docs/normal-mapping.html/0 | {
"file_path": "3d-game-shaders-for-beginners/docs/normal-mapping.html",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 6581
} | 4 |
[:arrow_backward:](blur.md)
[:arrow_double_up:](../README.md)
[:arrow_up_small:](#)
[:arrow_down_small:](#copyright)
[:arrow_forward:](ssao.md)
# 3D Game Shaders For Beginners
## Bloom
<p align="center">
<img src="https://i.imgur.com/UxKRz2r.gif" alt="Bloom" title="Bloom">
</p>
Adding bloom to a scene can really se... | 3d-game-shaders-for-beginners/sections/bloom.md/0 | {
"file_path": "3d-game-shaders-for-beginners/sections/bloom.md",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 1145
} | 5 |
[:arrow_backward:](film-grain.md)
[:arrow_double_up:](../README.md)
[:arrow_up_small:](#)
[:arrow_down_small:](#copyright)
[:arrow_forward:](gamma-correction.md)
# 3D Game Shaders For Beginners
## Lookup Table (LUT)
<p align="center">
<img src="https://i.imgur.com/WrPzVlW.gif" alt="LUT" title="LUT">
</p>
The lookup... | 3d-game-shaders-for-beginners/sections/lookup-table.md/0 | {
"file_path": "3d-game-shaders-for-beginners/sections/lookup-table.md",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 2018
} | 6 |
---
# clang-format documentation
# http://clang.llvm.org/docs/ClangFormat.html
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Preexisting formats:
# LLVM
# Google
# Chromium
# Mozilla
# WebKit
Language: Cpp
BasedOnStyle: Mozilla
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignTrailing... | AirSim/.clang-format/0 | {
"file_path": "AirSim/.clang-format",
"repo_id": "AirSim",
"token_count": 458
} | 7 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef air_RpcLibServerBase_hpp
#define air_RpcLibServerBase_hpp
#include "common/Common.hpp"
#include "api/ApiServerBase.hpp"
#include "api/ApiProvider.hpp"
namespace msr
{
namespace airlib
{
class RpcLibServerBase... | AirSim/AirLib/include/api/RpcLibServerBase.hpp/0 | {
"file_path": "AirSim/AirLib/include/api/RpcLibServerBase.hpp",
"repo_id": "AirSim",
"token_count": 1086
} | 8 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef air_GeodeticConverter_hpp
#define air_GeodeticConverter_hpp
#include <cmath>
#include "VectorMath.hpp"
namespace msr
{
namespace airlib
{
class GeodeticConverter
{
public:
GeodeticConverter(do... | AirSim/AirLib/include/common/GeodeticConverter.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/GeodeticConverter.hpp",
"repo_id": "AirSim",
"token_count": 4830
} | 9 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef CommonUtils_EnumFlags_hpp
#define CommonUtils_EnumFlags_hpp
namespace common_utils
{
template <typename TEnum, typename TUnderlying = typename std::underlying_type<TEnum>::type>
class EnumFlags
{
protected:
TU... | AirSim/AirLib/include/common/common_utils/EnumFlags.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/common_utils/EnumFlags.hpp",
"repo_id": "AirSim",
"token_count": 1476
} | 10 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//there is no #pragma once in this header
//following is required to support Unreal Build System
#if (defined _WIN32 || defined _WIN64) && (defined UE_GAME || defined UE_EDITOR)
#include "CoreTypes.h"
#include "Windows/Pre... | AirSim/AirLib/include/common/common_utils/WindowsApisCommonPre.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/common_utils/WindowsApisCommonPre.hpp",
"repo_id": "AirSim",
"token_count": 213
} | 11 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef airsim_core_PhysicsVehicleWorld_hpp
#define airsim_core_PhysicsVehicleWorld_hpp
#include "common/UpdatableContainer.hpp"
#include "common/Common.hpp"
#include "PhysicsBody.hpp"
#include "PhysicsEngineBase.hpp"
#inc... | AirSim/AirLib/include/physics/PhysicsWorld.hpp/0 | {
"file_path": "AirSim/AirLib/include/physics/PhysicsWorld.hpp",
"repo_id": "AirSim",
"token_count": 1674
} | 12 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef msr_airlib_GpsBase_hpp
#define msr_airlib_GpsBase_hpp
#include "sensors/SensorBase.hpp"
#include "common/CommonStructs.hpp"
namespace msr
{
namespace airlib
{
class GpsBase : public SensorBase
{
publi... | AirSim/AirLib/include/sensors/gps/GpsBase.hpp/0 | {
"file_path": "AirSim/AirLib/include/sensors/gps/GpsBase.hpp",
"repo_id": "AirSim",
"token_count": 1931
} | 13 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef air_CarRpcLibServer_hpp
#define air_CarRpcLibServer_hpp
#ifndef AIRLIB_NO_RPC
#include "common/Common.hpp"
#include <functional>
#include "api/RpcLibServerBase.hpp"
#include "vehicles/car/api/CarApiBase.hpp"
name... | AirSim/AirLib/include/vehicles/car/api/CarRpcLibServer.hpp/0 | {
"file_path": "AirSim/AirLib/include/vehicles/car/api/CarRpcLibServer.hpp",
"repo_id": "AirSim",
"token_count": 325
} | 14 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef msr_airlib_vehicles_ArduCopterSolo_hpp
#define msr_airlib_vehicles_ArduCopterSolo_hpp
#include "vehicles/multirotor/firmwares/mavlink/ArduCopterSoloApi.hpp"
namespace msr
{
namespace airlib
{
class ArduCopter... | AirSim/AirLib/include/vehicles/multirotor/firmwares/mavlink/ArduCopterSoloParams.hpp/0 | {
"file_path": "AirSim/AirLib/include/vehicles/multirotor/firmwares/mavlink/ArduCopterSoloParams.hpp",
"repo_id": "AirSim",
"token_count": 1646
} | 15 |
#pragma once
#include <cstdint>
#include "interfaces/ICommLink.hpp"
#include "interfaces/IGoal.hpp"
#include "interfaces/IOffboardApi.hpp"
#include "interfaces/IUpdatable.hpp"
#include "interfaces/CommonStructs.hpp"
#include "RemoteControl.hpp"
#include "Params.hpp"
namespace simple_flight
{
class OffboardApi : publ... | AirSim/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/OffboardApi.hpp/0 | {
"file_path": "AirSim/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/OffboardApi.hpp",
"repo_id": "AirSim",
"token_count": 4025
} | 16 |
#pragma once
#include "IUpdatable.hpp"
#include <cstdint>
namespace simple_flight
{
class ICommLink : public IUpdatable
{
public:
static constexpr int kLogLevelInfo = 0;
static constexpr int kLogLevelWarn = 1;
static constexpr int kLogLevelError = 2;
virtual void log(const std::string& message, int3... | AirSim/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/interfaces/ICommLink.hpp/0 | {
"file_path": "AirSim/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/interfaces/ICommLink.hpp",
"repo_id": "AirSim",
"token_count": 141
} | 17 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//in header only mode, control library is not available
#ifndef AIRLIB_HEADER_ONLY
//RPC code requires C++14. If build system like Unreal doesn't support it then use compiled binaries
#ifndef AIRLIB_NO_RPC
//if using Unreal... | AirSim/AirLib/src/vehicles/multirotor/api/MultirotorRpcLibClient.cpp/0 | {
"file_path": "AirSim/AirLib/src/vehicles/multirotor/api/MultirotorRpcLibClient.cpp",
"repo_id": "AirSim",
"token_count": 6553
} | 18 |
<?xml version="1.0"?>
<Solution>
<AnalysisConfiguration>
<AnalysisToolName Source="Default"/>
<AnalysisToolPathName Source="Default"/>
<Configuration Source="Default"/>
<AnalysisMethod Source="Default"/>
<PrecompiledHeaders Source="Default"/>
<ConfigFile Source="Default"/>
<PolicyFile Source="Default"/>
... | AirSim/AirSim.sln.vlconfig/0 | {
"file_path": "AirSim/AirSim.sln.vlconfig",
"repo_id": "AirSim",
"token_count": 1374
} | 19 |
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... | AirSim/GazeboDrone/src/main.cpp/0 | {
"file_path": "AirSim/GazeboDrone/src/main.cpp",
"repo_id": "AirSim",
"token_count": 2050
} | 20 |
<UserControl x:Class="LogViewer.Controls.AppSettings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://sche... | AirSim/LogViewer/LogViewer/Controls/AppSettings.xaml/0 | {
"file_path": "AirSim/LogViewer/LogViewer/Controls/AppSettings.xaml",
"repo_id": "AirSim",
"token_count": 851
} | 21 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace LogViewer.Controls
{
/// <summary>
/// Captures and eats MouseWheel events so that a nested ListBox does not
/// prevent an outer ... | AirSim/LogViewer/LogViewer/Controls/PassthroughMouseWheelBehavior.cs/0 | {
"file_path": "AirSim/LogViewer/LogViewer/Controls/PassthroughMouseWheelBehavior.cs",
"repo_id": "AirSim",
"token_count": 844
} | 22 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace LogViewer.Model
{
class KmlDataLog : IDataLog
{
DateTime startTime;
DateTime endTime;
XNamespace kmlns = XNamespa... | AirSim/LogViewer/LogViewer/Model/KmlDataLog.cs/0 | {
"file_path": "AirSim/LogViewer/LogViewer/Model/KmlDataLog.cs",
"repo_id": "AirSim",
"token_count": 5339
} | 23 |
// Copyright (c) 2010 Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft
// license agreement under which you licensed this source code.
// If you did not accept the terms of the license agreement,
// you are not authorized to use this source code.
//... | AirSim/LogViewer/LogViewer/Utilities/IsolatedStorage.cs/0 | {
"file_path": "AirSim/LogViewer/LogViewer/Utilities/IsolatedStorage.cs",
"repo_id": "AirSim",
"token_count": 2423
} | 24 |
using System;
using Microsoft.Networking.Mavlink;
using System.Threading.Tasks;
using System.Threading;
using System.Management;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.Networking
{
public class SerialPort : IPort
{
System.IO.Ports.SerialPort port;
publ... | AirSim/LogViewer/Networking/SerialPort.cs/0 | {
"file_path": "AirSim/LogViewer/Networking/SerialPort.cs",
"repo_id": "AirSim",
"token_count": 1248
} | 25 |
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AirSim.props))\AirSim.props" />
<ItemGroup Label="ProjectConfigurations">
... | AirSim/MavLinkCom/MavLinkMoCap/MavLinkMoCap.vcxproj/0 | {
"file_path": "AirSim/MavLinkCom/MavLinkMoCap/MavLinkMoCap.vcxproj",
"repo_id": "AirSim",
"token_count": 3470
} | 26 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <string>
#include <functional>
#include "MavLinkFtpClient.hpp"
typedef std::function<void()> TestHandler;
class ImageServer;
class UnitTests
{
public:
void RunAll(std::string comPort, int boardRa... | AirSim/MavLinkCom/MavLinkTest/UnitTests.h/0 | {
"file_path": "AirSim/MavLinkCom/MavLinkTest/UnitTests.h",
"repo_id": "AirSim",
"token_count": 264
} | 27 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef commn_utils_sincos_hpp
#define commn_utils_sincos_hpp
#include <cmath>
/*
GCC seem to define sincos already. However there is a bug currently which causes compiler to optimise
sequence of sin cos call in to sincos... | AirSim/MavLinkCom/common_utils/sincos.hpp/0 | {
"file_path": "AirSim/MavLinkCom/common_utils/sincos.hpp",
"repo_id": "AirSim",
"token_count": 413
} | 28 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MavLinkCom_VehicleState_hpp
#define MavLinkCom_VehicleState_hpp
#include <vector>
#include <string>
namespace mavlinkcom
{
typedef struct _VehicleState
{
typedef unsigned long long uint64_t;
typedef unsign... | AirSim/MavLinkCom/include/VehicleState.hpp/0 | {
"file_path": "AirSim/MavLinkCom/include/VehicleState.hpp",
"repo_id": "AirSim",
"token_count": 1375
} | 29 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "MavLinkLog.hpp"
#include "Utils.hpp"
#include <chrono>
using namespace mavlinkcom;
using namespace mavlink_utils;
#define MAVLINK_STX_MAVLINK1 0xFE // marker for old protocol
#define MAVLINK_STX 253 // marker fo... | AirSim/MavLinkCom/src/MavLinkLog.cpp/0 | {
"file_path": "AirSim/MavLinkCom/src/MavLinkLog.cpp",
"repo_id": "AirSim",
"token_count": 3216
} | 30 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MavLinkCom_MavLinkNodeImpl_hpp
#define MavLinkCom_MavLinkNodeImpl_hpp
#include "MavLinkNode.hpp"
#include "MavLinkConnection.hpp"
using namespace mavlinkcom;
namespace mavlinkcom_impl
{
class MavLinkNodeImpl
{
p... | AirSim/MavLinkCom/src/impl/MavLinkNodeImpl.hpp/0 | {
"file_path": "AirSim/MavLinkCom/src/impl/MavLinkNodeImpl.hpp",
"repo_id": "AirSim",
"token_count": 1079
} | 31 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef SERIAL_COM_SOCKETINIT_HPP
#define SERIAL_COM_SOCKETINIT_HPP
class SocketInit
{
static bool socket_initialized_;
public:
SocketInit();
};
#endif | AirSim/MavLinkCom/src/serial_com/SocketInit.hpp/0 | {
"file_path": "AirSim/MavLinkCom/src/serial_com/SocketInit.hpp",
"repo_id": "AirSim",
"token_count": 90
} | 32 |
from __future__ import print_function
import msgpackrpc #install as admin: pip install msgpack-rpc-python
import numpy as np #pip install numpy
import math
class MsgpackMixin:
def __repr__(self):
from pprint import pformat
return "<" + type(self).__name__ + "> " + pformat(vars(self), indent=4, widt... | AirSim/PythonClient/airsim/types.py/0 | {
"file_path": "AirSim/PythonClient/airsim/types.py",
"repo_id": "AirSim",
"token_count": 8825
} | 33 |
# Import this module to automatically setup path to local airsim module
# This module first tries to see if airsim module is installed via pip
# If it does then we don't do anything else
# Else we look up grand-parent folder to see if it has airsim folder
# and if it does then we add that in sys.path
import os,sys,... | AirSim/PythonClient/car/setup_path.py/0 | {
"file_path": "AirSim/PythonClient/car/setup_path.py",
"repo_id": "AirSim",
"token_count": 741
} | 34 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 5